Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> PLSQL Question
Hi All,
Some developers here have tried to come up with a procedure where they
can pass a table name to a functon, and a SELECT statement will be
returned with all the column names, thus eliminating the need for do a
SELECT *........
CURSOR tab_cols IS
SELECT column_name
FROM dba_tab_columns
WHERE table_name = 'RECRUIT';
BEGIN
FOR v_tab_cols IN tab_cols LOOP
IF v_sql IS NULL THEN v_sql := v_tab_cols.column_name; ELSE v_sql := v_sql || ', ' || v_tab_cols.column_name; END IF;
Just looking for some ideas here.....
Thanks in advance. Received on Mon Jul 10 2006 - 10:20:17 CDT