出DB文件用SQL,DB2 MYSQL

2021-10-08 11:17:46 字數 1519 閱讀 2445

mysql:

select table_name,table_comment from information_schema.tables where table_schema='skysupport';

select ordinal_position as '序號',column_name as '名稱',data_type as '資料型別',character_maximum_length as '長度',

numeric_scale as '小數字',is_nullable as '允許為空',

(case

when column_key='pri'

then '是'

else '否'

end) as '是否主鍵' ,

column_default as '預設值',

column_comment as '說明'

from information_schema.columns

where table_schema = 'skysupport'

and table_name = 'business_module' ; #你要查的表

select column_name as '名稱',

column_comment as '中文注釋',

data_type as '資料型別',

'' as '備註'

from information_schema.columns

where table_schema = 'taxany_sy'#表所在資料庫

and table_name = 'd005_tb_tax' ; #你要查的表

db2:

select t.colno+1 as 序號,

t.colname as 名稱,

lower(t.typename) as 資料型別,

t.length as 長度,

t.scale as 小數字,

t."nulls" as 允許為空,

case t.keyseq

when 1 then '是'

else '否'

end as 是否主鍵,

t.default as 預設值,

t.remarks as remark

from syscat.columns t

where tabschema='db2inst1' and tabname=upper('d005_tb_tax')

order by 序號 asc;

select

t.colname as 名稱,

t.remarks as 中文注釋,

lower(t.typename) as 資料型別,

'' as 備註

from syscat.columns t

where tabschema='db2inst1' and tabname=upper('d005_tb_tax')

order by t.colno asc;

db2 聯機文件 DB2基礎教程文件

1.1 db2 udb 的版本db2 針對於不同的使用者需求,提供了多種版本 企業伺服器版 enterprise server edition 該版本通常用於支援大規模的企業級應用程式以及大型企業級資料倉儲,它提供了最大程度的連線性,並 且可以與異構平台上的 db2資料庫和第三方廠商的資料庫產品共享...

DB2知識文件 3

如何使用db2move db2move db name action u userid p password action export,import,load options如下 option default notes tctable creators all creators export.w...

pytest文件2 用例執行

1.檔名以test py檔案和 test.py 2.以test 開頭的函式 3.以test 開頭的類 4.以test 開頭的方法 5.所有的包pakege必須要有 init py檔案 1.執行目錄下所有的用例 pytest 檔名 2.執行乙個py檔案下用例 pytest 指令碼名稱.py 3.x 遇...