collate - SQL Server '=' comparator Query case-sensitivity -
which of these 2 queries preferred , why?
declare @value1 varchar(16) = 'hello' ,@value2 varchar(16) = 'hello' ,@a int = 0 if convert(varbinary(max), @value1) = convert(varbinary(max), @value2) set @a = 1; if @value1 = @value2 collate latin1_general_cs_ai set @a = 2;
Comments
Post a Comment