Create or replace procedure procname
is
begin
update b set tag=2 where tag=0;
insert into a (id , name, editdate )
select id,name,editdate from b where tag=2;
update b set tag=1 where tag=1;
end;
没有便宜,知己试试.
is
begin
update b set tag=2 where tag=0;
insert into a (id , name, editdate )
select id,name,editdate from b where tag=2;
update b set tag=1 where tag=1;
end;
没有便宜,知己试试.
解决方案 »
- 新手求助 关于不同行数字的操作
- 怎样把数据从表空间system到另一表空间aa?
- (重新整理)难题!“移动加权平均成本”计算的SQL的写法。(证券成本计价)
- sql server 转 oracle10G的问题????
- 在触发器怎么引用pl\sql程序块?
- 有没有可能将ACCECC库中某张表的记录插到ORACLE中已有的表中去呢?
- 怎样用介质恢复数据文件
- [200分]一个存储过程怎样调用java源,给个例子好吗?小弟急用???!![在线急等]
- 如何将动态pl/sql中的执行特权授给调用者
- 请问如何把一个text导入到oracle中,如果是sun机器的oracle呢又如何导!
- oracle中如何换行,高手帮忙
- 请问这样的语句该怎么写?
1.lock table b; -- 防止向A表写数据的过程中有新的数据写入
2. insert into a(id , name, editdate )
select id , name, editdate from b
where tag = 1;
3. update b set tag = 0 where tag = 1;
4. commit;
INSERT ON "AAAAA" FOR EACH ROW declare
begin
insert into a(id , name, editdate)values(:new.id,:new.name,:new.editdate);
:new.tag:='0';
end;