zfxcms ^回到顶部

您的当前位置:首页 > 最新IT资讯 > MySQL > mysql查询表字段名称,字段类型

mysql查询表字段名称,字段类型

所属分类: MySQL   2019-01-29 17:16:48  编辑:admin  浏览次数 577 次

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 表名;



随笔文章检索

随笔文章目录