码迷,mamicode.com
首页 > 数据库 > 详细

MYSQL查询表结构

时间:2016-03-04 13:07:34      阅读:213      评论:0      收藏:0      [点我收藏+]

标签:

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查询表结构

标签:

原文地址:http://www.cnblogs.com/cbread/p/5241542.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!