Does Oracle prohibit reference to Table_Name, Column_Name, etc by reference to a declared variable? I am trying to create a simple routine to print documentation whenever any changes are made to the database using the following routine:
CURSOR Table_cursor is
WHERE table_name like upper('c%') or
table_name like upper('t%') or
table_name like upper('v%');
v_tablename varchar2(30) := '';
FETCH table_cursor INTO v_cursor;
EXIT WHEN table_cursor%NOTFOUND;
v_tablename := v_cursor.table_name;
The problem is in the line DESCRIBE v_tablename. If I remove this line, the printed output is exactly as I want. I then want to use that list to print table definitions and do this dynamically so I can update documentation whenever a table is changed.
Free Guide: Managing storage for virtual environments
Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!