查看某一用户(数据库)下的序列
select * from all_sequences WHERE sequence_owner='GOLD_SRM';
删除某一用户(数据库)下的序列
declare owner_name varchar(20); cursor cur1 is select sequence_name from user_sequences; begin owner_name := 'GOLD_SRM'; for cur2 in cur1 loop execute immediate 'drop sequence '||owner_name||'.'||cur2.sequence_name; end loop; end;
GOLD_SRM 是用户名(数据库名)
批量删除序列
select 'drop sequence ' || sequence_name || ';' as sqlscript from user_sequences; --delete seqs
THE END
暂无评论内容