Computer >> บทช่วยสอนคอมพิวเตอร์ >  >> การเขียนโปรแกรม >> MySQL

วิธีดูตารางของฐานข้อมูลอื่น (ไม่ใช่ database ปัจจุบัน) ใน MySQL


ใช้คำสั่ง SHOW TABLES FROM database_name; ตัวอย่าง: อยู่ใน database new แต่อยากดูตารางใน database gaurav:

mysql> use new;
Database changed
mysql> show tables from gaurav;
+--------------------+
| Tables_in_tutorial |
+--------------------+
| testing            |
| employee           |
| tender             |
| Ratelist           |
+--------------------+
4 rows in set (0.00 sec)

ไม่ต้อง USE database นั้นก่อนก็ได้