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
 SQL Server 2005 Forums
 Transact-SQL (2005)
 How to Add existing row value and new value

Author  Topic 

ssmani84
Starting Member

20 Posts

Posted - 2010-07-08 : 07:52:45
hi Friends,
I need to add Existing row value and new value in table
ex,
ProductID QTY
1 5
2 10
3 5


here the productid 1 is having QTY 5 now i update this Qty to 25
how do i form the query add QTY 5+20=25

ssmaniyadav

RickD
Slow But Sure Yak Herding Master

3608 Posts

Posted - 2010-07-08 : 07:56:35
UPDATE ProductTable
SET QTY = QTY + 20
WHERE ProduxctID = 1
Go to Top of Page

ssmani84
Starting Member

20 Posts

Posted - 2010-07-08 : 08:36:25
Thanks RickD..

ssmaniyadav
Go to Top of Page
   

- Advertisement -