日期:2014-05-16  浏览次数:20838 次

mysql 查看表结构
2006年11月01日 星期三 16:18
mysql> show databases;
//察看数据库列表

11 rows in set (0.00 sec)
mysql> use ertlzw;  
//显示ertlzw库中的数据列表
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> show tables; 
//显示ertlzw库中的数据列表

8 rows in set (0.00 sec)

mysql> describe article;
//显示ertlzw库中的数据列表中的article表结构

8 rows in set (0.00 sec)

mysql> use ertlzw; 
//显示ertlzw库中的内容
Database changed
mysql> select * from article;
Empty set (0.00 sec)

mysql> select * from admintable; 
//显示ertlzw库中的表admintable所有内容

1 row in set (0.01 sec)

mysql>

作者: DareGo