Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Checking for table existance
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
![]() |
![]() |