資料庫查表頭
① 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」圖標。