views:

30

answers:

2

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

+4  A: 
UPDATE myTable SET myColumn = myColumn + 2
David Hedlund
+1  A: 
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
Pace