MySql中查询表中的列名

例如我的数据库名为“example”,使用

USE example;
image

确定使用example数据库。使用

show tables;
image

显示数据库中的所有表。使用

DESC persons;
image

显示表persons中的列名。或者使用

DESCRIBE persons;
image

或者使用

SHOW columns FROM persons;
image

posted on 2015-09-10 10:44  寒叶峰  阅读(1820)  评论(0编辑  收藏  举报

导航