create or replace procedure create_table
as
tablenum varchar(5);
tablename varchar(100);
begin
tablenum :='CP';
for stu in (select table_name from user_tables where table_name like 'IP_%') loop
tablename := tablenum ||'_' || stu.table_name;
CREATE TABLE tablename AS SELECT * FROM stu.table_name;
/*存储过程输出语句*/
/*dbms_output.put_line();*/
end loop;
end create_table;
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…