Oracle删除用户下的sequence
程序员文章站
2022-07-14 20:03:13
...
--Oracle删除用户下的sequence
declare owner_name varchar(20);
cursor cur1 is select sequence_name from user_sequences;
begin
owner_name := '用户名';
for cur2 in cur1 loop
execute immediate 'drop sequence '||owner_name||'.'||cur2.sequence_name;
end loop;
end;