如下表:month jfje
1 2
1 5
1 6
1 7
2 0
2 5
2 0
2 0
2 0
2 6我想把month=2的数据中,字段jfje为0的值,全部改为空‘null’
改后如下表,求教,谢谢,month jfje
1 2
1 5
1 6
1 7
2
2 5
2
2
2
2 6
1 2
1 5
1 6
1 7
2 0
2 5
2 0
2 0
2 0
2 6我想把month=2的数据中,字段jfje为0的值,全部改为空‘null’
改后如下表,求教,谢谢,month jfje
1 2
1 5
1 6
1 7
2
2 5
2
2
2
2 6
update A
set jfje=null where month=2
update 表名 set jfje=null where month='2';
这样就行了啊。
update test set jfje=replace(jfje,'0','') where month='2'
set jfje=null where month=2 and jfje=0
declare
cursor c is
select * from tt for update;
begin
for v_temp in c loop
if(v_temp.month=2 and v_temp.jfje=0) then
update tt set b=null where current of c;
end if;
end loop;
commit;
end;
把表名改一下,我不知道你的表叫什么就随便取个tt