一、简单描述表结构,字段类型desc tabl_name;
显示表结构,字段类型,主键,是否为空等属性,但不显示外键。
二、查询表中列的注释信息
select * from information_schema.columns where table_schema = 'db' #表所在数据库
and table_name = 'tablename' ; #你要查的表
三、只查询列名和注释
select column_name,
column_comment from information_schema.columns where table_schema ='db' and
table_name = 'tablename' ;
四、#查看表的注释
select table_name,table_comment from information_schema.tables where table_schema = 'db' and table_name ='tablename'
ps:二~四是在元数据表中查看,我在实际操作中,常常不灵光,不知为什么,有了解的大侠请留印。
五、查看表生成的DDL show create table table_name;

161215、MySQL 查看表结构简单命令的更多相关文章

  1. MySQL 查看表结构简单命令

    一.简单描述表结构,字段类型 desc tabl_name; 显示表结构,字段类型,主键,是否为空等属性,但不显示外键. 例如:desc table_name 二.查询表中列的注释信息 select ...

  2. MySQL 查看表结构简单命令。

    一.简单描述表结构,字段类型 desc tabl_name; 显示表结构,字段类型,主键,是否为空等属性,但不显示外键. 二.查询表中列的注释信息 select * from information_ ...

  3. Mysql 查看表结构的命令

    创建数据库create database abc; 显示数据库 show databases; 使用数据库 use 数据库名; 直接打开数据库 mysql -h localhost -u root - ...

  4. mysql查看表结构命令

    mysql查看表结构命令 mysql查看表结构命令,如下: desc 表名;show columns from 表名;describe 表名;show create table 表名; use inf ...

  5. mysql查看表结构,字段等命令

    mysql查看表结构命令,如下: desc 表名; show columns from 表名; describe 表名; show create table 表名;

  6. MySQL 查看表结构

    mysql查看表结构命令,如下: desc 表名; show columns from 表名; describe 表名; show create table 表名; use information_s ...

  7. MySQL查看表结构及查看建表语句

    查看表结构:desc 表名 mysql> use recommend; Database changed mysql> desc user; +--------------+------- ...

  8. mysql查看表结构2种方式对比

    1.desc t_bookType; 2.show create table t_bookType; 相信大部分人还是喜欢第一种查看表结构方式.

  9. mysql 查看表结构方法

    留给自己备查: mysql 导出为 csv 文件时如果直接使用导出命令是无法导出表结构的, 因此我们需要能够查询表结构的方法: 方法如下: 1.desc(描述)命令 desc tablename;de ...

随机推荐

  1. My租房网

    阶段一:采用分页top关键字进行查询 实现6条~~10条出租信息 阶段2:查询指定客户发布的租房信息 查询客户张三的信息,使用连接查询实现. 阶段3:按区县制作房屋出租清单

  2. UniversalAndroidImageLoader出现异常:ImageLoader: Unable to resolve host "https": No address associated with host

    问题描述 使用ImageLoader时,出现如下错误,始终加载图片错误,显示img_error的图片.UniversalAndroidImageLoader出现异常:ImageLoader: Unab ...

  3. css形状大全

    转至:http://blog.sina.com.cn/s/blog_4abb9bba0101acsx.html

  4. winform把图片存储到数据库

    1.先在Form中放一个PictureBox控件,再放三个按钮. 2.双击打开按钮,在里面写如下代码: OpenFileDialog open1 = new OpenFileDialog(); Dia ...

  5. SpringMVC下的Shiro权限框架的使用

    SpringMVC+Shiro权限管理 博文目录 权限的简单描述 实例表结构及内容及POJO Shiro-pom.xml Shiro-web.xml Shiro-MyShiro-权限认证,登录认证层 ...

  6. Go 语言学习

    golang中国 http://www.golangtc.com/ 第三方github学习 https://github.com/Unknwon/go-fundamental-programmingh ...

  7. jQuery上定义插件并重设插件构造函数

    插件alert的全部代码,每个插件都定义在如下类似的作用域中: +function ($) { 'use strict'; // ALERT CLASS DEFINITION // ========= ...

  8. windows 精简/封装/部署

    给一个精简过的Windows7安装net35,提示自己到『打开或关闭Windows功能』里打开,然而发现并没有,只有一个ie9的功能.搜索尝试各种办法,显然都不行.用dism部署功能的工具,挂载一个完 ...

  9. git-配置公司账号

    1.初始化配置 git config --global user.name " abc" git config --global user.email "abc@123. ...

  10. A quick renice command rescheduled the upgrade to a lower priority and I was back to surfing in no time.

    https://www.nixtutor.com/linux/changing-priority-on-linux-processes/ Changing Priority on Linux Proc ...