mysql怎么获取表中属性值

  • mysql怎么获取表中属性值已关闭评论
  • A+
所属分类:技术教程
摘要

mysql获取表属性值的方法1.查询数据表中所有字段的属性select * from information_schema.columnswhere table_schema= ‘数据库库名’ and table_name = ‘表名’2.

本文收集自网络,
mysql怎么获取表中属性值

mysql怎么获取表中属性值

Mysql获取表属性值的方法

查询数据表中所有字段的属性

select * from infORMation_schema.columns

where table_schema= '数据库库名' and table_name = '表名'

查询数据库中所有字段的属性

select * from information_schema.columns

where table_schema= '数据库库名'

查询数据库中特定列条件字段的属性

select table_schema,table_name,column_name,column_type,column_comment

from information_schema.columns

where TABLE_SCHEMA='数据库名' and column_name = '字段名';

  • 我的微信
  • 这是我的微信扫一扫
  • weinxin
  • 我的微信公众号
  • 我的微信公众号扫一扫
  • weinxin