日期:2014-05-16  浏览次数:20490 次

快速获取ORACLE表字段的清单
可以很方便的查出表中的所有字段,开发时可用上,免得一个一个字段的书写。
Select  max(SYS_CONNECT_BY_PATH(COLUMN_NAME, ', '))
From (select A.COLUMN_NAME,A.TABLE_NAME, ROWNUM AS ROWNO
from USER_TAB_COLUMNS A
where TABLE_NAME = '表名称'
ORDER BY A.COLUMN_ID)
start with ROWNO = 1
connect by ROWNO = rownum;  



http://blog.csdn.net/ocean20/archive/2009/01/12/3761548.aspx