//第一步:先把value2的值赋给value1 ;
update tblTemp set value1 = value2 ;
commit ;
//第二步:清空value2
update tblTemp set value2 = null;
commit ;注意:顺序别操作反了。
update tblTemp set value1 = value2 ;
commit ;
//第二步:清空value2
update tblTemp set value2 = null;
commit ;注意:顺序别操作反了。
解决方案 »
- MERGE ??
- right join不能取到右表的全部数据了
- 新新新~~~怎么判断数据库中某几个字段是否符合条件。查询结果是:这几个字段是否有符合条件的值?
- 【求助】VC++ 开发OCI 必须安装完整的oracle程序吗
- 急!向oracle中clob字段插入数据,insert的时候如何循环?
- Oracle 11g DBConsole 登陆时出现证书错误该如何解决????
- 通过 web ip port 无法访问 isqlplus
- 连接时数据库时没有监听
- 急!请指教该SQL如何写?
- select 语句怎么写?
- 问一条SQL
- 我是菜鸟,想学oracle数据库,听说要用java开发,不知从何学起,请大侠指教!多谢
不是全部记录都移动
create or replace trigger tri_name
after insert or update on tbltemp
for each rowdeclare
temp varchar2(20);begin
temp:=:new.value1;
:new.value1:=:new.value2;
:new.value2:=temp;
end tri_name