查询数据库表名,数据表信息,MySQL Key值(PRI, UNI, MUL)的含义

数据表名:

  SELECT TABLE_NAME FROM information_schema.`TABLES` WHERE TABLE_SCHEMA ='v53' AND TABLE_TYPE ='BASE TABLE'

数据表信息:

  SELECT COLUMN_NAME ,IS_NULLABLE ,COLUMN_TYPE,COLUMN_KEY FROM information_schema.`COLUMNS` WHERE TABLE_SCHEMA ='v53' AND TABLE_NAME ='bi_user_info';

MySQL Key值(PRI, UNI, MUL)的含义:

  PRI主键约束  UNI唯一约束  MUL可以重复

posted @ 2018-01-17 18:20  ぃSolitary_boy  阅读(4343)  评论(0编辑  收藏  举报