MySQL 查询字段时,区分大小写
时间:2021-07-01 10:21:17
帮助过:3人阅读
select * from user;
+----+----------+-----------+------+------+
| id
| username
| loginname
| pwd
| sex
|
+----+----------+-----------+------+------+
| 1 | 小明
| xiaoming
| 123 | 1 |
| 2 | 管理员
| Admin
| 123 | 1 |
+----+----------+-----------+------+------+
2 rows
in set (
0.00 sec)
mysql> select * from user where loginname
="Admin";
+----+----------+-----------+------+------+
| id
| username
| loginname
| pwd
| sex
|
+----+----------+-----------+------+------+
| 2 | 管理员
| Admin
| 123 | 1 |
+----+----------+-----------+------+------+
1 row
in set (
0.00 sec)
mysql> select * from user where loginname
="admin";
Empty set (
0.00 sec)
MySQL 查询字段时,区分大小写
标签:set xiaomi col row 管理 rom 小明 weight inf