MySql
- 查看表结构
desc <表名>
select column_name,column_comment from information_schema.columns where table_schema =’<数据库名字>’ and table_name = ‘<表名>’
show create table <表名>
本文介绍了三种在MySql中查看表结构的方法:使用desc命令快速预览表字段;通过执行SQL查询从information_schema获取更详细的列信息及注释;利用show create table命令展示创建表的完整SQL语句。
2346
1667
5万+

被折叠的 条评论
为什么被折叠?