declare
v_rowcount integer;
begin
v_rowcount:=0;
select count(*) into v_rowcount from ALL_SEQUENCES
where sequence_name='SEQ_XX';
if v_rowcount=0 then
execute immediate 'create sequence SEQ_XX
minvalue 1
maxvalue 9999999999
start with 1
increment by 1
cache 20
order';
end if;
end;