Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

how to update a null value field in sql server

eg
a table contains 3 fields id,name,salary
and 3 records
salary of 1 record is null
i want update the nullfield

111 arun 300
112 ddd 200
113 ttt null
i want to update table with add 100 to every record include null
after updation
the recrds should be
111 arun 400
112 ddd 300
113 ttt 100

Answer Posted / ganesh.k

UPDATE Table_Name SET Salary = COALESCE(Salary,0) + 100

(Or)

UPDATE Table_Name SET Salary = ISNULL(Salary,0) + 100

Is This Answer Correct ?    15 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the use of keyword with encryption. Create a store procedure with encryption?

1006


Why use stored procedures in sql server?

1057


What is SubQuery in SQL Server 2008

1070


Explain iaas, paas and saas?

92


Why use view instead of a table?

1001


What does it mean to normalize data?

996


let's assume you have data that resides on sql server 6.5. You have to move it sql server 7.0. How are you going to do it? : Sql server database administration

1018


What is BCNF? How is it better than 2NF & 3NF?

1065


What happens when converting big values to numeric data types?

1224


how can u get last observation in an unknown dataset ?

2484


What is the use of =,==,=== operators?

1057


Is it true, that there is no difference between a rule and a check constraint?

1109


How self join is different from outer join?

1175


How to replace the Query Result 'Null Value' with a text ?

1093


Explain what are various ways to enhance the ssrs report?

1097