数据库查表头
① mysql镆ユ垒涓涓鏁版嵁搴扑腑镓链夌壒瀹氩墠缂镄勮〃
php 涓崭细銆
mysql 閲岄溃锛 镆ヨ 琛ㄧ殑淇℃伅锛 鎴戝掓槸浼氱殑銆
鏄浠 information_schema.tables 杩欓噷镆ヨ㈢殑銆
涓嬮溃鏄涓涓渚嫔瓙锛
mysql> SELECT table_name, table_type, engine
-> FROM information_schema.tables
-> WHERE table_schema = 'test'
-> ORDER BY table_name DESC;
-> //
+--------------------+------------+--------+
| table_name | table_type | engine |
+--------------------+------------+--------+
| v_sale_report_x | VIEW | NULL |
| v_sale_report | VIEW | NULL |
| union_tab_2 | BASE TABLE | InnoDB |
| union_tab_1 | BASE TABLE | InnoDB |
| test_trigger_table | BASE TABLE | InnoDB |
| test_tab2 | BASE TABLE | InnoDB |
| test_tab | BASE TABLE | InnoDB |
| test_main | BASE TABLE | InnoDB |
| test_dysql | BASE TABLE | InnoDB |
| test_create_tab4 | BASE TABLE | InnoDB |
| test_create_tab2 | BASE TABLE | InnoDB |
| test_create_tab1 | BASE TABLE | InnoDB |
| test_create_tab | BASE TABLE | InnoDB |
| sale_report | BASE TABLE | InnoDB |
| log_table | BASE TABLE | InnoDB |
+--------------------+------------+--------+
15 rows in set (0.02 sec)
② mysql 如何使用sql查询某一个表的表头
工具/材料:Management Studio。
1、首先在桌面上,点击“Management Studio”图标。