您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

你可能不知道的MySQL_MySQL

2024/2/18 10:33:25发布32次查看
mysql> desc tbl_name;
+-------+--------------+------+-----+---------+-------+
| field | type         | null | key | default | extra |
+-------+--------------+------+-----+---------+-------+
| uid   | int(11)      | no   |     | null    |       |
| sid   | mediumint(9) | no   |     | null    |       |
| times | mediumint(9) | no   |     | null    |       |
+-------+--------------+------+-----+---------+-------+
3 rows in set (0.00 sec)
存储引擎是myisam,里面有10,000条数据。
一、“\g”的作用
mysql> select * from tbl_name limit 1;
+--------+--------+-------+
| uid    | sid    | times |
+--------+--------+-------+
| 104460 | 291250 |    29 |
+--------+--------+-------+
1 row in set (0.00 sec)
mysql> select * from tbl_name limit 1\g;
*************************** 1. row ***************************
uid: 104460
sid: 291250
times: 29
1 row in set (0.00 sec)有时候,操作返回的列数非常多,屏幕不能一行显示完,显示折行,试试”\g”,把列数据逐行显示(”\g”挽救了我,以前看explain语句横向显示不全折行看起来巨费劲,还要把数据和列对应起来)。
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product