คำสั่งที่ให้ข้อมูลเหมือน DESCRIBE มี 2 คำสั่ง:
1. EXPLAIN Statement
Synonym ของ DESCRIBE ไวยากรณ์เหมือนกัน:
mysql> Explain Employee; +-------+-------------+------+-----+---------+------------------+ | Field | Type | Null | Key | Default | Extra | +-------+-------------+------+-----+---------+------------------+ | ID | int(11) | NO | PRI | NULL | auto_increment | | Name | varchar(20) | YES | | NULL | | +-------+-------------+------+-----+---------+------------------+ 2 rows in set (0.11 sec)
2. SHOW COLUMNS Statement
Synonym อีกตัว ไวยากรณ์ต่างออกไป:
ไวยากรณ์
SHOW COLUMNS From Table_name;
ตัวอย่าง
mysql> Show columns from employee; +-------+-------------+------+-----+---------+------------------+ | Field | Type | Null | Key | Default | Extra | +-------+-------------+------+-----+---------+------------------+ | ID | int(11) | NO | PRI | NULL | auto_increment | | Name | varchar(20) | YES | | NULL | | +-------+-------------+------+-----+---------+------------------+ 2 rows in set (0.11 sec)
ผลลัพธ์เหมือน DESCRIBE และ EXPLAIN ทุกประการ