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 -> Re: DROP table <some table>;

Re: DROP table <some table>;

From: AlexJent <alexjent_at_aol.com>
Date: 1997/02/13
Message-ID: <19970213024801.VAA25016@ladder01.news.aol.com>#1/1

Gary wrote:
>>In Oracle, The Complete Reference the examples for sqlplus to
>>create a table start with:
>>drop table <the table to be created>;
>>create table <the table> ( ...
>>
>>Now, I understand that the error is ignorable, but as a
>>programmer it bothers me not to 1st check for the table's
>>prior existence. So, how does one begin such a SQL script
>>wherein the logic would be:
>>if (<the table to be created> exists) then
>>drop table <the table>
>>end
>>create table ...

Hi Gary,

   I guess the idea here is whether or not table exists, it won't hurt to attempt to drop it. The SQL code can ignore the error and continue. Even if such syntax existed I doubt that I'd use it! It would amount to more typing with no real gain in functionality and doesn't buy me anything more. IMHO.

Alex

Alex Jentilucci - Consultant
Information System Dynamics, Inc
Minneapolis, MN 55323
Tele: 612-476-7395 FAX: 612-473-5954 E-Mail: infosys_at_aol.com

E-Mail Work: jentilucci_at_notes.seagate.com

          Home: AlexJent_at_aol.com Received on Thu Feb 13 1997 - 00:00:00 CST

Original text of this message

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