当前位置: 代码迷 >> ASP >> update同时更新两个字段如何组合起来写
  详细解决方案

update同时更新两个字段如何组合起来写

热度:102   发布时间:2012-03-05 11:54:03.0
update同时更新两个字段怎么组合起来写?
比如:   test表里a字段和b字段
我想实现当id=1时   同时改变a和b的值

update   test   set   a= '11 '   where   id=1
update   test   set   b= '22 '   where   id=1

分着写我会,怎么合成一个update语句来写呢?

------解决方案--------------------
update test set a= '11 ',b = '22 ' where id=1
  相关解决方案