mysql命令行查看表结构,字段等信息 [mysql]
2015-09-30 11:36
801 查看
http://blog.sina.com.cn/s/blog_5c7a5178010117en.html
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;
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;
相关文章推荐
- cmake安装mysql
- mysql连接远程数据库出现 ERROR 2013 (HY000) Lost connection to MySQL server at 'reading authorization packet',
- mysql免安装的配置
- MySQL的自增主键
- osx安装启动mysql
- mysql修改表、字段、库的字符集
- Code First for Mysql 错误:未为提供程序“MySql.Data.MySqlClient”找到任何 MigrationSqlGenerator。请在目标迁移配置类中使用 SetSql
- 如果使用得当,MySQL 也可以化身 NoSQL
- 如果使用得当,MySQL 也可以化身 NoSQL
- MySQL中的备份和恢复
- mysql基础知识-操作表数据
- mysql删除有外链索引数据,Cannot delete or update a parent row: a foreign key constraint fails 问题的解决办法
- mysql基础知识
- MySQL5.6 GTID新特性实践
- CentOS使用MySQL的详细步骤,及C API编程
- 《php和mysql web开发》笔记——第5章 代码重用与函数编写
- MySQL----cluster安装
- mysql查询数据表的路径
- mysql查询数据库约束
- MYSQL复制表