仔细看一下下面的语句你就明白啦:)
---------------------
DECLARE @user_password varchar(12)
set @user_password='DavidDong'
IF CAST (@user_password AS varbinary(12)) =
CAST ('Daviddong' AS varbinary(12))
PRINT 'Password match'
ELSE
PRINT 'Password mismatch'
------------------
declare @user_password Varchar(12)
set @user_password='DavidDong'
if (@user_password='daviddong')
PRINT 'Password match'
ELSE
PRINT 'Password mismatch'