mysql查询表字段名称,字段类型
所属分类: MySQL 2019-01-29 17:16:48 编辑:admin 浏览次数 1068 次
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 表名;
猜你喜欢
- mysql中使用show table 查看表信息 2019-01-29
- sql语句中取整数和小数部分,截取字符串常用函数 2019-03-21
- mysql函数-字符串操作 2019-04-09
- mysql函数-数字操作 2019-04-09
- mysql函数-时间操作 2019-04-09
- MySQL 之 创建千万数据测试 2019-04-17