5 de octubre de 2011

Comparar mayúsculas y minúsculas en palabras

Declare @var1 varchar(10)
Declare @var2 varchar(10)
set @var1 ='Good'
set @var2 ='gooD'
if cast(@var1 as varbinary) = cast(@var2 as varbinary)
print 'Good and gooD are treated same'
else
print 'Good and gooD are not treated same'

No hay comentarios:

Publicar un comentario