Note that LIKE
will work either case-sensitively or case-insensitively depending upon which collation is in effect for the expression, but in your case, you have specified no wildcards so there is little point looking to use LIKE
.
The default SQL Server installation is case-insensitive.
If you want a case-insensitive compare because you've got a case-sensitive database, you can cast. I believe this is the appropriate syntax (I've never used it for an IN list on one side of an expression, though).
SELECT *
FROM emailaddresses
WHERE addr COLLATE SQL_Latin1_General_CP1_CI_AS
IN (
'john@google.com' COLLATE SQL_Latin1_General_CP1_CI_AS
,'jim@google.com' COLLATE SQL_Latin1_General_CP1_CI_AS
)
A real case for LIKE
would be something for something like addr LIKE '%@google.com"