Wednesday, March 5, 2008

How to find the Table Exist or not and then Creating the Table in Oracle

declare
cnt number;
begin
select count(*) into cnt from user_objects where object_name='DDL_USER';
if cnt=0 then
execute immediate 'create table ddl_user(user_name varchar2(15) primary key,password varchar2(10),date_created date,status char(1))';
end if;
end;

No comments:

 
Feedback Form