原文: http://tech.it168.com/oldarticle/2006-04-02/200604021512359.shtml http://www.cnblogs.com/m-cnblogs/archive/2012/02/23/2364906.html 1.创建测试存储过程: SQL> create or replace procedure proc_test(p1 IN varchar2,p2 OUT varchar2) is 2 begin 3 SELECT p1 IN…
首先写一个存储过程: create or replace procedure p_syn_equipment_20161205 is sqlstr ); begin --清空表 sqlstr := 'truncate table staff_20161205'; execute immediate sqlstr; --插入数据 sqlstr := 'insert into staff_20161205 select * from tb_base_staff s where s.staff_nam…