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!

How to change the tablename at runtime?

user565033Mar 11 2009 — edited Mar 11 2009
Hi
IN _10gR2_
I would like to know if there is a way to change the tablename at runtime - other than using dynamic sql.

These table have similar structure except the tablename iteself.

For ex. depending on where we get a request we want to look/update different table:

if request_from x then
select * from table where ....
or it could be update or insert statement here
end if;

if request from y then
select * from table_y where ....
or it could be update or insert statement here
end if;

Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 8 2009
Added on Mar 11 2009
17 comments
877 views