mysql查看表结构命令,如下:
desc 表名;
show columns from 表名;
describe 表名;
show create table 表名;
use information_schema
select * from columns where table_name='表名';
查询所有数据库:
show databases;
use 数据库名;
show tables;
创建数据库
create database abc;
desc 表名;
show columns from 表名;
describe 表名;
show create table 表名;
use information_schema
select * from columns where table_name='表名';
查询所有数据库:
show databases;
use 数据库名;
show tables;
创建数据库
create database abc;
本文介绍MySQL中用于查询表结构的多种方法,包括desc、show columns、describe和show create table等命令,并展示了如何使用information_schema视图来获取更详细的列信息。此外还提供了查询所有数据库及表的基本命令。
2687

被折叠的 条评论
为什么被折叠?



