Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Drop a table via synonym
nicetom786_at_yahoo.com wrote:
> Thanks for yor reply.
> As per design,The procedure should drop the table and create the table
> each time when run.
>
> drop table A
> create table A as select * from table B where 1=2;
>
> So a synonym will not help in this case......
> Pls advise.
>
Why would you want to drop it and then re-create it?
Do you understand what truncate table will do?
"As per design" is not an answer. It sounds like a bad design to begin with. It's time for you to understand how many things you can hose up when you drop a table.
I answered your original question ... yes you can write your procedure in schema y to do a drop table x.table_name if you grant appropriate permissions. But you probably don't want to proceed like that in the first place.
Or you can create a procedure in schema x ( drop_my_table ) and have procedure in schema x do an " execute x.drop_my_table ".
But you probably don't want to do that either. Received on Thu Nov 30 2006 - 17:42:10 CST