DECLARE
TYPE ref_cursor IS REF CURSOR;
rc_ ref_cursor;
c_ NUMBER;
i_ NUMBER;
col_count_ NUMBER;
desc_tab_ DBMS_SQL.DESC_TAB;
BEGIN
OPEN rc_ FOR 'SELECT user_id uid1,user_name FROM fnd_user';
c_ := DBMS_SQL.to_cursor_number(rc_);
DBMS_SQL.DESCRIBE_COLUMNS(c_, col_count_, desc_tab_);
FOR i_ IN 1..col_count_ LOOP
DBMS_OUTPUT.PUT_LINE(desc_tab_(i_).col_name);
END LOOP ;
DBMS_SQL.CLOSE_CURSOR(c_);
END;
No comments:
Post a Comment