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 -> SQL possible equivalent

SQL possible equivalent

From: Jeff Kish <jeff.kish_at_mro.com>
Date: Wed, 30 May 2007 09:10:16 -0400
Message-ID: <a2tq53dh0551v98fn7dhtjguul4bm1362r@4ax.com>


I have a script for ms sql server that checks to see if a table exists... if it does it drops it and recreates it.

I'm wondering how to do this using only sql if possible. I can figure it out using pl/sql but I'm not sure of the correct approach (or even if it is possible) using just sql.

I realize you can select from user_tab_cols like this: select table_name from user_tab_columns where upper(table_name) = 'ASSET'

but how do I fit this into a sort of ifdef else sort of flow control in sql?

Can someone point me in the right direction? Do I need to somehow insert pl/sql into the sql?

thanks
Jeff Kish Received on Wed May 30 2007 - 08:10:16 CDT

Original text of this message

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