MYSQL的一些命令
展示指定表的所有列详细信息
mysql> show full columns from settle;
+-----------+---------------+-----------------+------+-----+---------+----------------+---------------------------------+-----------------+
| Field | Type | Collation | Null | Key | Default | Extra | Privileges | Comment |
+-----------+---------------+-----------------+------+-----+---------+----------------+---------------------------------+-----------------+
| id | int(11) | NULL | NO | PRI | NULL | auto_increment | select,insert,update,references | 主key |
| deal_time | int(11) | NULL | NO | | NULL | | select,insert,update,references | 提交时间 |
| userid | varchar(32) | utf8_general_ci | NO | | NULL | | select,insert,update,references | 用户id |
| name | varchar(128) | utf8_general_ci | NO | | NULL | | select,insert,update,references | 店铺名称 |
| contact | varchar(32) | utf8_general_ci | NO | | NULL | | select,insert,update,references | 联系人 |
| location | varchar(1024) | utf8_general_ci | NO | | NULL | | select,insert,update,references | 店铺地址 |
| phone | varchar(32) | utf8_general_ci | NO | | NULL | | select,insert,update,references | 手机号码 |
| note | text | utf8_general_ci | YES | | NULL | | select,insert,update,references | 备注 |
| status | int(11) | NULL | NO | | NULL | | select,insert,update,references | 是否已处理 |
+-----------+---------------+-----------------+------+-----+---------+----------------+---------------------------------+-----------------+
9 rows in set (0.00 sec)
修改现有表的字符集
ALTER TABLE tablename CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;