Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Want to construct insert statement from all_tab_columns

user507531Feb 12 2010 — edited Feb 12 2010
I am using Oracle 10GR2 and a new user for plsql

I want to write a plsql block or SQL in order to insert some dummy data.
I want to use the column list from all_tab_columns and want to construct insert statement

EX: I am trying to construct SQL as below

for i in (select column_name from all_tab_columns where table_name='EMP')
loop
v_sql := insert into emptest valuesi.column_name

could you please let me know any pointer for the same ..?
can I use any other technique for the same .. like collection, nested table etc
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 12 2010
Added on Feb 12 2010
9 comments
1,165 views