日期:2014-05-17  浏览次数:20935 次

批量更新字段
某一表中有2个字段,A和B,如果A中字段是1,BZ中字段里的所有数据后面加上‘--新品’,请问大家怎么办?

------解决方案--------------------
SQL code
update table1 set b=b|| '--新品' where a=1;
commit;

------解决方案--------------------
update tab_name
set B=B||'--新品'
where A=1
------解决方案--------------------
SQL code
update table1 set b=b||'--新品' where a=1;
commit;