語句如下:
SELECTt1.Table_NameAS"表名稱",
t3.commentsAS"表說明",
t1.Column_NameAS"字段名稱",
t1.Data_TypeAS"數(shù)據(jù)類型",
t1.Data_LengthAS"長度",
t1.NullAbleAS"是否為空",
t2.CommentsAS"字段說明",
t1.Data_Default"默認(rèn)值"
FROMcolst1leftjoinuser_col_commentst2
ont1.Table_name=t2.Table_nameandt1.Column_Name=t2.Column_Name
leftjoinuser_tab_commentst3
ont1.Table_name=t3.Table_name
WHERENOTEXISTS(SELECTt4.Object_NameFROMUser_objectst4
WHEREt4.Object_Type='TABLE'
ANDt4.Temporary='Y'
ANDt4.Object_Name=t1.Table_Name)
ORDERBYt1.Table_Name,t1.Column_ID;
查詢完成后,粘貼指定的列即可
更多信息請查看IT技術(shù)專欄