Show pageOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== Table column list ====== How to get a CSV list of columns for a table? <code oracle8> /** Supplied with a table name return a comma separated list of its columns in ascending order. */ FUNCTION getColumnList (fromuser VARCHAR2, ptablename VARCHAR2) return VARCHAR2 IS columnArray dbms_utility.uncl_array; csvLen binary_integer; csvList varchar2(4000); BEGIN select column_name bulk collect into columnArray from all_tab_cols where table_name = ptablename and owner = fromuser and hidden_column = 'NO' order by column_name; dbms_utility.table_to_comma(columnArray, csvLen, csvList); return csvList; END; </code> {{tag>oracle plsql programming}} blog/commalistofcolumns.txt Last modified: 2009/11/27 17:53by 127.0.0.1