MySQL之desc查看表结构的详细信息

describe是查看表结构的

describe tablename;

desc 是 describe 的简写,例:

desc tablename;

另外desc在排序中的意义是降续排列(和describe的简写不是同一个),例:

select * from table order by id desc;
Field:字段表示的是列名

  Type:字段表示的是列的数据类型

    Null :字段表示这个列是否能取空值

    Key :在mysql中key 和index 是一样的意思,这个Key列可能会看到有如下的值:PRI(主键)、MUL(普通的b-tree索引)、UNI(唯一索引)

    Default: 列的默认值

    Extra :其它信息

猜你喜欢

转载自blog.csdn.net/qq_39505065/article/details/89469519