日期:2014-05-19  浏览次数:20603 次

如何在一句sql语句中把某列的值选出来加上20?
类似这样:
tempA   =   select   a   from   tab   where   id=1
update   set   a   =   TempA   +   20   where   id=1

类似这样的功能用一句sql如何实现?

------解决方案--------------------
update XXX set a = a + 20 where id = 1
------解决方案--------------------
好象是這個意思?

Select tempA = a + 20 from tab where id=1