selecttable_catalog,
table_schema as 資料庫名,
table_name as 表名,
column_name as 欄位名,
ordinal_position as 字段位置,
column_default as 字段預設值,
is_nullable 是否允許空值,
data_type as 資料型別,
character_maximum_length as 以字元為單位的最大長度,
character_octet_length as 以位元組為單位的最大長度,
numeric_precision as 數值型別的長度,
numeric_scale as 小數點精度,
datetime_precision as 回的日期時間值的精度,
character_set_name as 編碼方式,
collation_name as 校對集,
column_type as 字段型別,
column_key as 鍵,
extra as 額外的資訊例如自動遞增在這裡顯示,
privileges as 許可權,
column_comment as 字段注釋,
generation_expression
from
information_schema. columns
where
table_schema = 'testplatform'
select
table_schema,
table_name,
column_name,
column_type,
column_comment
from
information_schema. columns
where
table_schema = '資料庫名稱'
select
table_schema,
table_name as '表名',
column_name as '欄位名',
column_type as '資料型別',
is_nullable as '允許為空',
extra as '額外資訊',
column_comment as '字段說明'
from
information_schema.`columns`
where
table_schema = 'testplatform'
mysql匯出資料字典彙總
select table catalog,table schema as 資料庫名,table name as 表名,column name as 欄位名,ordinal position as 字段位置,column default as 字段預設值,is nullable 是否允許空值,data...
SQL 匯出資料字典
用於參考 select 表名 case when a.colorder 1 then d.name else end,表說明 case when a.colorder 1 then isnull f.value,else end,字段序號 a.colorder,欄位名 a.name,主鍵 case ...
mysql資料字典
1 顯示資料庫列表2 顯示當前連線的資料庫 mysql select database 3 顯示庫中的資料表 mysql use mysql 指定mysql庫 mysql show tables 4 顯示資料表的結構 mysql describe yourtablename 說明 describe ...