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

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -