开发者

How to set a column x with the value x+y in Oracle?

I wanted the exact syntax for the following operation

UPDATE table1
SET colx= colx+y
WHERE ..some condtion..

Note: c开发者_C百科olx and y are of the type NUMBERs

Thanks, Amrutha


Your syntax is already correct. For example:

update emp
set    sal = sal + 1000
where  empno = 1234;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜