create or replace procedure sequence_procedure
AS
i_count integer;
begin
select count(*) into i_count from user_objects t where t.OBJECT_TYPE ='SEQUENCE' and t.OBJECT_NAME = upper('sequence_name');
if i_count>0 then
EXECUTE IMMEDIATE 'drop sequence sequence_name';
end if;
end sequence_procedure;
/
call sequence_procedure();
drop procedure sequence_procedure;
create sequence SEQUENCE_NAME
minvalue 1
maxvalue 999999999999999999999999999
start with 1
increment by 1
cache 20;
AS
i_count integer;
begin
select count(*) into i_count from user_objects t where t.OBJECT_TYPE ='SEQUENCE' and t.OBJECT_NAME = upper('sequence_name');
if i_count>0 then
EXECUTE IMMEDIATE 'drop sequence sequence_name';
end if;
end sequence_procedure;
/
call sequence_procedure();
drop procedure sequence_procedure;
create sequence SEQUENCE_NAME
minvalue 1
maxvalue 999999999999999999999999999
start with 1
increment by 1
cache 20;