mysql 查询表结构信息

  • Post author:
  • Post category:mysql


SELECT

COLUMN_NAME 字段名称,

COLUMN_TYPE 字段类型,

( CASE WHEN is_nullable = ‘NO’ THEN ‘NOT NULL’ ELSE ” END ) AS 默认值

FROM

INFORMATION_SCHEMA.COLUMNS

WHERE

table_schema = ‘pilotplatform’ AND table_name = ‘abpuserroles’



版权声明:本文为weixin_42003678原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。