0
点赞
收藏
分享

微信扫一扫

mysql 查询表的字段的属性、注释、字段信息


  • mysql查询表所有字段的属性和注释

select * from information_schema.columns where table_name='表名'

  • mysql获取表的所有字段信息

SELECT
column_name columnName,
data_type dataType,
column_comment columnComment,
column_key columnKey,
extra
FROM
information_schema.COLUMNS
WHERE
table_name = 'user'
AND table_schema = ( SELECT DATABASE ( ) )
ORDER BY
ordinal_position


举报

相关推荐

0 条评论