这个是查看表结构
mysql> desc mtb_zip;
+---------+---------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+---------+---------+------+-----+---------+-------+
| zip_id | int(11) | NO | PRI | 0 | |
| zipcode | text | YES | | NULL | |
| state | text | YES | | NULL | |
| city | text | YES | | NULL | |
| town | text | YES | | NULL | |
+---------+---------+------+-----+---------+-------+
5 rows in set (0.03 sec)
这个是查看建表语句的
mysql> show create table mtb_zip;
+---------+-----------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
----+
| Table | Create Table
|
+---------+-----------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
----+
| mtb_zip | CREATE TABLE `mtb_zip` (
`zip_id` int(11) NOT NULL DEFAULT '0',
`zipcode` text,
`state` text,
`city` text,
`town` text,
PRIMARY KEY (`zip_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 |
+---------+-----------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
----+
1 row in set (0.00 sec)