mysql中查看表结构的sql语句

mysql查看表结构命令,如下:

desc 表名;
show columns from 表名;
describe 表名;
show create table 表名;


use information_schema; #切换到information_schema数据库
select * from columns where table_name='表名'; #查看表信息

顺便提下MySQL常用语句:
show databases;
use 数据库名;
show tables

posted @ 2013-12-20 09:42  daniell2012  阅读(3219)  评论(0)    收藏  举报