Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 how to subtract in sql

Author  Topic 

codrgiii
Starting Member

29 Posts

Posted - 2009-05-28 : 16:38:13
how would i be able to subtract a whole column to something like -1000?

the column im looking to subtract from is named count, and im looking to subtract the whole column by -1000, how would i be able to do that?

Lamprey
Master Smack Fu Yak Hacker

4614 Posts

Posted - 2009-05-28 : 16:53:31
If I understand your requirement, something like this:
UPDATE
MyTable
SET
NamedCount = NamedCount - 1000
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2009-05-28 : 16:56:26
Subtract -1000 is the same thing as adding +1000...


E 12°55'05.63"
N 56°04'39.26"
Go to Top of Page
   

- Advertisement -