日期:2014-05-16 浏览次数:20545 次
select a.TABLE_NAME,TABLESPACE_NAME ,b.TABLE_TYPE,B.COMMENTS from user_tables a,user_tab_comments b WHERE A.TABLE_NAME=B.TABLE_NAME order by TABLE_NAME
select a.view_NAME ,b.TABLE_TYPE,B.COMMENTS from user_views a,user_tab_comments b WHERE A.view_NAME=B.TABLE_NAME order by TABLE_NAME
strsql = "select * from user_col_comments where comments is not null"
select * from user_tab_columns where table_name = Upper('t_wp_s401'); select column_name from dba_tab_columns where owner=upper('xxx') and table_name='t_wp_s401'; select column_name,comments from user_col_comments where table_name = Upper('t_wp_s401') ;
SELECT Sysobjects.name AS TABLE_NAME,sys.extended_properties.[value] AS COLUMN_DESCRIPTION FROM syscolumns INNER JOIN systypes ON syscolumns.xtype = systypes.xtype LEFT JOIN sysobjects ON syscolumns.id = sysobjects.id LEFT OUTER JOIN sys.extended_properties ON ( sys.extended_properties.minor_id = syscolumns.colid AND sys.extended_properties.major_id = syscolumns.id) LEFT OUTER JOIN syscomments ON syscolumns.cdefault = syscomments.id WHERE syscolumns.id IN (SELECT id FROM SYSOBJECTS WHERE xtype = 'U') AND (systypes.name <> 'sysname') and (Sysobjects.name='table10') ORDER BY syscolumns.colid
test = "SELECT Sysobjects.name AS BLE_NAME,sys.extended_properties. [value] AS COLUMN_DESCRIPTION FROM syscolumns INNER JOIN systypes ON syscolumns.xtype = systypes.xtype LEFT JOIN sysobjects ON syscolumns.id = sysobjects.id LEFT OUTER JOIN sys.extended_properties ON ( sys.extended_properties.minor_id = syscolumns.colid AND sys.extended_properties.major_id = syscolumns.id) LEFT OUTER JOIN syscomments ON syscolumns.cdefault = syscomments.id WHERE syscolumns.id IN (SELECT id FROM SYSOBJECTS WHERE xtype = 'U') AND (systypes.name <> 'sysname') and (Sysobjects.name='table10') ORDER BY syscolumns.colid"