CRUD-區分大小寫查詢
where
查詢
mysql> select * from t_emp where ename = "smith";
+-------+-------+-------+------+------------+--------+------+--------+
| empno | ename | job | mgr | hiredate | sal | comm | deptno |
+-------+-------+-------+------+------------+--------+------+--------+
| 7369 | SMITH | CLERK | 7902 | 1980-12-17 | 800.00 | NULL | 20 |
+-------+-------+-------+------+------------+--------+------+--------+
正常的where
語句對字符串的查詢都是不區分大小寫的
區分大小寫查詢
mysql> select * from t_emp where binary ename = "smith";
Empty set (0.00 sec)
可以通過binary
關鍵字進行查詢