开发者

Is it possible to replace data in a column in ms-access?

开发者 https://www.devze.com 2022-12-13 21:03 出处:网络
In ms-access database, is it possible to write an sql query to replace the number in a column with a number obtained by adding 2 to this original开发者_如何学运维 number. ie, all numbers ina column sh

In ms-access database, is it possible to write an sql query to replace the number in a column with a number obtained by adding 2 to this original开发者_如何学运维 number. ie, all numbers in a column should be replaced by the original number plus 2


UPDATE myTable SET myColumn = myColumn + 2


UPDATE YourTable 
SET 
    NUMBER = NUMBER + 2

If you don't do a where your going to do the whole lot. So if you are doing this from a form you need something like

WHERE id = ' & me.ID 
0

精彩评论

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