标签:app value html user cto word data number sql
SQLServer中比较字符串的时候 如果字符串末尾是空格 那么SQLServer会无视那些空格直接进行比较。
declare
@a
nvarchar(
50
);set
@a
=N
‘happycat1988‘
declare
@b
nvarchar(
50
);set
@b
=N
‘happycat1988 ‘
if
(
@a
=
@b
)
select
‘True‘
as 直接等号比较
else
select
‘False‘
as 直接等号比较
if
(
@a
like
@b
)
select
‘True‘
as like比较
else
select
‘False‘
as like比较
标签:app value html user cto word data number sql
原文地址:https://www.cnblogs.com/majority/p/9259634.html