aaa t.a%type; insert into t (a,...) values(...) returning a into aaa;
可否写完整些?因为刚学习oracle所以对于您写的还不太明白
aaa t.id%type; --定义t表id字段类型插入t表 insert into t (id) values(seq.NEXTVAL) returning id into aaa;--赋值給aaa insert into t1 (id) values(aaa)-- 用aaa的值插入另一个表
create or replace procedure pro(参数列表) IS BEGIN aaa t.id%type; --定义t表id字段类型 insert into t (id) values(seq.NEXTVAL) returning id into aaa;--赋值給aaa insert into t1 (id) values(aaa)-- 用aaa的值插入另一个表 END; 请教:是这样写吗?
IS aaa t.id%type; BEGIN commit; exception when others then rollback; END;
insert into t (a,...)
values(...)
returning a into aaa;
insert into t (id)
values(seq.NEXTVAL)
returning id into aaa;--赋值給aaa
insert into t1 (id)
values(aaa)-- 用aaa的值插入另一个表
IS
BEGIN
aaa t.id%type; --定义t表id字段类型
insert into t (id)
values(seq.NEXTVAL)
returning id into aaa;--赋值給aaa
insert into t1 (id)
values(aaa)-- 用aaa的值插入另一个表
END;
请教:是这样写吗?
aaa t.id%type;
BEGIN
commit;
exception
when others then
rollback;
END;