开发者

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

开发者 https://www.devze.com 2023-03-28 04:28 出处:网络
I wanted the exact syntax for the following operation UPDATE table1 SET colx= colx+y WHERE ..some condtion..

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

精彩评论

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