コメント、テーブルスペースも含めて。-- テーブル一覧を抽出する
SELECT A.TABLE_NAME AS TABLE_NAME, A.TABLESPACE_NAME AS TABLESPACE_NAME, A.STATUS AS STATUS
, A.TABLE_TYPE AS TABLE_TYPE,C.COMMENTS AS COMMENTS
FROM USER_TAB_COMMENTS C RIGHT OUTER JOIN
((SELECT TABLE_NAME, TABLESPACE_NAME, STATUS, 'TABLE' AS TABLE_TYPE FROM USER_TABLES)
Union (SELECT VIEW_NAME AS TABLE_NAME, '' AS TABLESPACE_NAME, '' AS STATUS, 'VIEW' AS TABLE_TYPE FROM USER_VIEWS)) A
ON A.TABLE_NAME = C.TABLE_NAME
ORDER BY A.TABLE_TYPE, A.TABLE_NAME;
Written on 2009/02/18 by MAN2
ORACLE:SQLメモ、テーブル一覧の抽出
Labels:
Oracle
0 Comments
Subscribe to:
Post Comments (RSS)
0 Responses to "ORACLE:SQLメモ、テーブル一覧の抽出"
Post a Comment