Showing posts with label Oracle. Show all posts
Showing posts with label Oracle. Show all posts

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;

How to know available user objects like Table,Procedures,Views,..etc in Oracle

select * from user_objects where object_type='TABLE';
 
Feedback Form