日期:2014-05-18  浏览次数:20375 次

超简单,请问怎么在一个表中同时update更新两个数据!
表;   test  
字段:   a     字段:   b   字段:c
当   a值为1   时候   更新b= '1 '   更新c= '1 '  

update   test   set   b= '1 '   where   a=1
update   test   set   c= '1 '   where   a=1

分着写我会,怎么把b和c的更新用一个update语句来实现呢?谢谢大家,我是菜鸟,不要笑话,请不吝赐教!


------解决方案--------------------
update test set b= '1 ',c= '1 '
where a=1