Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Is it a table or a view
Hi
In my client application, I want to delete a table that I have created. It's not a tempoary table but I use it as such. I have a method called drop table for this purpose. Before trying to drop the table, I check for existence by calling "SELECT COUNT(*) FROM user_tab_columns WHERE table_name = 'MyTempTable". I do this bcause I want to avoid errors.
Now, I use this particular client to test various strategies to see what works best. I now think it would be worthwhile to let MyTempTable be a view instead of a table.
I therefore need something likDropTableOrView, the idea beaing to use DROP VIEW if it's a view. How do I modify the first query so that it only finds a view with that name.
I realize I could use a different naming scheme but I don't want to do that.
Regards,
Fredrik
Received on Thu Aug 21 2003 - 17:31:11 CDT
![]() |
![]() |