一.sql语句
1.查询表中的列名,类型,注释
select
column_name '列名',
data_type '类型',
column_comment '备注'
from
information_schema.columns
where
table_schema='数据库名'
and
table_name='表名';
2.查询数据库的表名
select
table_name '表名',
table_rows '行数',
table_comment '备注'
from
information_schema.tables
where
table_schema='数据库名'