SELECT A.TABLE_NAME
, (
SELECT C.COMMENTS
FROM DBA_TAB_COMMENTS C
WHERE A.OWNER = C.OWNER AND A.TABLE_NAME = C.TABLE_NAME
) AS TABLE_COMMENTS
,B.COLUMN_ID AS COLUMN_NO
,B.COLUMN_NAME
,(
SELECT D.COMMENTS
FROM DBA_COL_COMMENTS D
WHERE A.OWNER = D.OWNER
AND A.TABLE_NAME = D.TABLE_NAME
AND B.COLUMN_NAME = D.COLUMN_NAME
) AS COLUMN_COMMENTS
, B.DATA_TYPE
, CASE
WHEN B.DATA_TYPE IN ('VARCHAR', 'VARCHAR2', 'CHAR') THEN
TO_CHAR(B.DATA_LENGTH)
WHEN B.DATA_TYPE = 'NUMBER' THEN
B.DATA_PRECISION || ',' ||
DECODE(B.DATA_SCALE,0,'0',B.DATA_SCALE)
ELSE ''
END AS DATA_LENGTH
,B.NULLABLE
FROM DBA_TABLES A
JOIN DBA_TAB_COLUMNS B
ON A.OWNER = B.OWNER
AND A.TABLE_NAME = B.TABLE_NAME
WHERE A.OWNER = 'ABUTW3'
AND A.TABLE_NAME LIKE 'AB_%'
ORDER BY A.TABLE_NAME
,B.COLUMN_ID
'세상이야기' 카테고리의 다른 글
깔끔한 사이트 http://www.dawn.com/ , 잡지 (0) | 2016.08.30 |
---|---|
내가 좋와하는 싸이트 (0) | 2016.08.17 |
X2CRM - Sales, Marketing, Workflow, Custom Apps, PHP, MySQL (0) | 2016.03.11 |
Stilearn - Admin Template (0) | 2016.03.11 |
구글 한글 폰트 (0) | 2016.01.09 |