查询
- 查询当前数据库所有表
show tables;
- 查询表结构
desc 表名;
- 查询指定表的建表语句
show create table 表名;
创建
create table 表名(
字段1 字段1类型[ comment 字段1注释 ],
字段2 字段2类型[ comment 字段2注释 ],
......
字段n 字段n类型[ comment 字段n注释 ]
)[ comment 表注释 ];
show tables;
desc 表名;
show create table 表名;
create table 表名(
字段1 字段1类型[ comment 字段1注释 ],
字段2 字段2类型[ comment 字段2注释 ],
......
字段n 字段n类型[ comment 字段n注释 ]
)[ comment 表注释 ];
本文标题:DDL-数据表操作
本文链接:https://www.haomeiwen.com/subject/cccfzrtx.html
网友评论