2010-06-23 46 views

回答

8
  • Explain會給你更多的 信息有關的查詢,
  • describe會給你的表或列更多 信息。

您也可以在表名上使用EXPLAIN,在這種情況下,它的行爲將與DESCRIBE完全相同。

EXPLAIN SELECT * 
FROM `customer` 

id select_type table type possible_keys key key_len ref rows Extra 
1 SIMPLE customer ALL NULL NULL NULL NULL 2 

DESCRIBE `customer` 
Field Type Null Key Default Extra 
CustomerID varchar(2) NO  
Cx varchar(3) NO