Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Is it a table or a view

Is it a table or a view

From: Fredrik Wahlgren <fredrik.p.wahlgren_at_mailbox.swipnet.se>
Date: Fri, 22 Aug 2003 00:31:11 +0200
Message-ID: <uvH1b.70542$zL.355@news1.bredband.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US