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: Checking for table existance

Re: Checking for table existance

From: Iosif Tanasescu <a_at_j.smith>
Date: 21 Apr 1998 22:55:08 GMT
Message-ID: <01bd6d78$944e8980$a51c67d1@iosif>

I'd like to check for the existance of a table before I create it

Declare
Nr integer;
begin
Select count(*) into nr
from all_tables
where table_name = 'YOUR_TABLE_NAME'
and owner= 'YOUR_OWNER';
if nr = 1 then
  dbms_output('I FOUND"IT');
else
  dbms_output('Not yet created;');
end if;
end; Received on Tue Apr 21 1998 - 17:55:08 CDT

Original text of this message

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