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

What are the difference between clustered and a non-clustered index?

1037


What is difference between getdate and sysdatetime in sql server 2008?

1047


Do you know what is raid and what are different types of raid configurations? : SQL Server Architecture

1059


What is read committed?

1076


What is the full form of ddl?

920


Explain sql delete command?

1044


What are different types of roles provided by ssrs?

150


Explain the advantages of merge replication?

946


How global temporary tables are represented and its scope?

966


how would you store your query in an SSRS report or a Database server?

162


What are temporal tables in sql server 2016?

879


What are the lambda triggers?

895


Which are the olap features?

951


How to return the date part only from a sql server datetime datatype?

1098


query processing

2158