แสดงตาราง + ประเภทใน Current Database
Syntax
SHOW FULL TABLES;
ตัวอย่าง: Current DB = 'query'
mysql> SHOW FULL TABLES;
+-----------------------------+------------+
| Tables_in_query | Table_type |
+-----------------------------+------------+
| accounts | BASE TABLE |
| address | BASE TABLE |
| cars | BASE TABLE |
| cars_avgprice | VIEW |
| countries | BASE TABLE |
| customer_view | VIEW |
| customers | BASE TABLE |
| date_time_test | BASE TABLE |
| detail_bday | BASE TABLE |
| details_city | BASE TABLE |
| ... | ... |
| view_student_detail | VIEW |
| view_student_detail_columns | VIEW |
| websites | BASE TABLE |
+-----------------------------+------------+
87 rows in set
Table_type
- BASE TABLE: ตารางจริงที่เก็บข้อมูล
- VIEW: Virtual table จาก Query
- SYSTEM VIEW: View ของระบบ (information_schema, performance_schema)
คำสั่งเก่า (ไม่แสดงประเภท)
SHOW TABLES;
-- เทียบเท่า SHOW FULL TABLES WHERE Table_type = 'BASE TABLE'