第一次接触存储过程,不会怎么搞,在网上找了列子有些看不懂!!!
假如 我有 A , B ,C 三个表 关系:A.id=B.id 我要把A,B两个表中的数据都查出来,然后添加到C表中去。这个存储过程我要怎么写啊?求大神们指点一下。
------解决方案--------------------
create or replace procedure test is
begin
insert into c select a.id,a.c1,a.c2,b.c1... from a,b where a.id=b.id;
commit;
end test;