1. 程式人生 > >mysql 常用命令列

mysql 常用命令列

查詢某庫某表的表結構及列註釋

select * from information_schema.columns where table_schema ='庫名'
and table_name = '表名' ;

例子:

簡化使用版本(查詢某庫某表的表結構及列註釋)

select TABLE_NAME,COLUMN_NAME,DATA_TYPE,COLUMN_COMMENT from information_schema.columns where table_schema ='cpu_bid_project'
and table_name = 'cpu_bid_pjt_section';