查询表结构

SELECT
 COLUMN_NAME,
 COLUMN_TYPE,
 COLUMN_DEFAULT,
 IS_NULLABLE,
 COLUMN_COMMENT 
FROM
 information_schema.COLUMNS 
WHERE
 table_schema = '数据库名' 
 AND table_name = '表名'

 

posted @ 2022-06-07 13:39  CanyingV  阅读(39)  评论(0编辑  收藏  举报