Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: DROP table <some table>;
>In article <5dtr0t$gi_at_ns2.southeast.net> garyg_at_users.jaxnet.com (Gary M.
Greenberg) writes:
>>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 ...
You could check the datadictionary to see whether the table already exists.
Stefan.
Name :G.R.S. Deisz Phone :+31-50-5855954 E mail :G.R.S.Deisz_at_PTT-TELECOM.Unisource.NL DISCLAIMER:This statement is not an official statement from, nor does it represent an official position of, PTT Telecom BV.Received on Fri Feb 14 1997 - 00:00:00 CST