1 -- 动态创建序列 2 declare 3 cursor c_job is 4 select TABLE_NAME from user_tables; 5 6 c_row c_job%rowtype; 7 v_sql varchar2(200); 8 begin 9 for c_row in c_job loop10 begin11 v_sql := 'create sequence SEQ_' || c_row.TABLE_NAME;12 dbms_output.put_line(v_sql);13 execute immediate v_sql;14 end;15 end loop;16 17 end;