Mysql查看表的结构相关命令

来源:互联网 发布:熊出没知夏日连连看 编辑:程序博客网 时间:2024/06/04 18:53

1、查看某个数据库dbtest中表table1的表结构。

mysql>show databases;

mysql>use dbtest;

mysql>show tables;

mysql>show create table table1;

2、只显示数据库中表的列。

mysql>show columns from table1;

3、显示表中字段信息

use information_schema;

select * from columns where table_name='table1';

4、显示表名中以‘table’为开头的所有表。

show tables like 'table%';



0 0
原创粉丝点击