在不区分大小的环境中,以下查询的结果是不区分大小写的:
1 SELECT empid, firstname, lastname 2 FROM HR.Employees 3 WHERE lastname = N'davis';
如果想让过滤条件区分大小写,则可以这样写:
1 SELECT empid, firstname, lastname 2 FROM HR.Employees 3 WHERE lastname COLLATE Latin1_General_CS_AS = N'davis';