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 loop
10     begin
11       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;

 

相关文章:

  • 2021-11-30
  • 2021-11-21
  • 2021-06-05
  • 2021-05-21
  • 2021-10-14
  • 2022-12-23
猜你喜欢
  • 2021-11-13
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-15
  • 2022-12-23
  • 2021-12-15
相关资源
相似解决方案