在写sql的查询时 如下:
select * from Users where username=\'WangE\'
select * from Users where username=\'wange\'
上面两条查询语句的结果是一样的,这说明username的条件并没有区分大小写。
若要使用上面的的语句能够执行按区分大小写查询 需要在查询的结尾加上 collate Chinese_PRC_CS_AI_WS
完整语句是:
select * from Users where username=\'WangE\' collate Chinese_PRC_CS_AI_WS