Skip to Main Content

SQL Developer

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to check whether a table exists in database

846283Mar 14 2011 — edited Mar 14 2011
test9997 is table already made in database with 3 columns :1st-varchar,2nd-number,3rd-number

declare
var1 varchar2(20);
var2 number(20);
var3 number(20);
begin
plvar1 :='this is again pl/sql';
plvar2 := 12;
plvar3 := 13;
IF (???? condition for existence of table say test1111??????) then
create table test1111(
var1 varchar2(20);
var2 number(20);
var3 number(20);
)
insert into test1111(plvar1,plvar2,plvar3);
else
insert into test1111(plvar1,plvar2,plvar3);;
end if;
end;


in the above code i want to check existence of a table and insertion or updation will be based on it after creation if it doesnt exist.


how to do it
please help asap
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 11 2011
Added on Mar 14 2011
1 comment
201 views