mysql查询表字段名称,字段类型
2019-01-29 17:16:48 来源:admin 点击:789
mysql查询表字段名称,字段类型
select column_name,column_comment,data_type
from information_schema.columns
where table_name='查询表名称' and table_schema='数据库名称'
select column_name from information_schema.COLUMNS where table_name='sys_users' and TABLE_SCHEMA='taoke'
desc 表名;
show columns from 表名;
describe 表名;
show create table 表名;
use information_schema
select * from columns where table_name='表名';
show databases;
use 数据库名;
show tables;
然后查看表里面的数据
select * from 表名;