-
Help with Column!
Hello Database Experts,
I need your help guys as I need to add a constant number to a column with existing numbers already like:
TABLE COLUMN_X
1 .......... 12
2 .......... 14
3 .......... 8
Now, i just need to say add 10 to all values in COLUMN_X so the final table will become:
TABLE COLUMN_X
1 .......... 22
2 .......... 24
3 .......... 18
Please help as I am very new to MS SQL.
Thanking you all in advance.
Powerhouse
MSSQL 2000 enterprise ed
Last edited by powerhouse; 02-08-2008 at 02:30 AM.
-
UPDATE Table
SET Column_X = Column_X + 10
WHERE ...
-
--This will update all the rows in the table
UPDATE Table
SET Column_X = Column_X + 10
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|