新手mysql 数据库查询问题
得一得漂 2017-05-12 05:43:53 mysql> CREATE table IF NOT EXISTS user3(
-> id char(18) primary key,
-> username varchar(40)
-> );
Query OK, 0 rows affected (0.01 sec)
--新建了一个table
mysql> select*from user3;
+--------------------+----------+
| id | username |
+--------------------+----------+
| 310110202012121000 | 小明 |
| 310110202012121001 | 小红 |
| 310110202012121011 | 小蓝 |
| 310110202012121111 | 小黄 |
+--------------------+----------+
4 rows in set (0.00 sec)
--输入了几个数据,然后想查询
mysql> select*from user3 where id=310110202012121000;
+--------------------+----------+
| id | username |
+--------------------+----------+
| 310110202012121000 | 小明 |
| 310110202012121001 | 小红 |
| 310110202012121011 | 小蓝 |
+--------------------+----------+
3 rows in set (0.00 sec)
结果给出了3个结果?这是怎么回事?查询只能查到前15位字符嘛?
字符都用的utf8mb4