MYSQL查询表结构
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了MYSQL查询表结构相关的知识,希望对你有一定的参考价值。
mysql查看表结构命令,如下:
desc 表名;
show columns from 表名;
describe 表名;
show create table 表名;
use information_schema; #切换到information_schema数据库
select * from columns where table_name=‘表名‘; #查看表信息
顺便提下MySQL常用语句:
show databases;
use 数据库名;
show tables;
另外Oracle几个有用的语句:
select * from v$database;
select * from all_users;
select * from user_tables;
以上是关于MYSQL查询表结构的主要内容,如果未能解决你的问题,请参考以下文章