读书人

怎么在一句sql语句中把某列的值选出来

发布时间: 2012-01-06 22:55:18 作者: rapoo

如何在一句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

读书人网 >asp.net

热点推荐