Sunday, February 19, 2012

hw to update a column value when it already have a value?

Hi,

i need to update the value in the column by adding to the value already in that column.

For eg, the value is in the column is already 5, i need to update it with addition of 8. i.e 5+8 = 13. The final value should be 13 in the column after that.
How do I go about doing it?

UPDATE Table 1 SET ColumnName +=8 ?

Thanks in advance. really at a loss and very urgent.UPDATE Table 1 SET ColumnName=ColumnName +8

Originally posted by sunspot
Hi,

i need to update the value in the column by adding to the value already in that column.

For eg, the value is in the column is already 5, i need to update it with addition of 8. i.e 5+8 = 13. The final value should be 13 in the column after that.
How do I go about doing it?

UPDATE Table 1 SET ColumnName +=8 ?

Thanks in advance. really at a loss and very urgent.|||You could have gone thru books online also for reference.

No comments:

Post a Comment