标签:mysql 指令 表结构
desc tablenamename;
describe tablename;
show columns tablename;
show create table tablename;
1,2,3展示的是
+-------------+-------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-------------+-------------+------+-----+---------+----------------+
| id | int(11) | NO | PRI | NULL | auto_increment |
| uid | int(11) | NO | | 0 | |
| create_time | int(11) | NO | | NULL | |
| grade | varchar(10) | YES | | NULL | |
+-------------+-------------+------+-----+---------+----------------+
第4中是把创建表的语句打出来,如下;
+--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| t_test | CREATE TABLE `t_test` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT ‘ID‘,
`uid` int(11) NOT NULL DEFAULT ‘0‘ COMMENT ‘用户id‘,
`create_time` int(11) NOT NULL COMMENT ‘发放时间‘,
`grade` varchar(10) DEFAULT NULL COMMENT ‘等级‘,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 |
标签:mysql 指令 表结构
原文地址:http://7814265.blog.51cto.com/7804265/1789328