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 / mohan

update #temp
set sal = COALESCE(sal+100,100)

Is This Answer Correct ?    4 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the minimum recommended amount of ram for sql server 2012 enterprise?

930


How to stop log file growing too big?

1012


What happens when converting big values to numeric data types?

1123


What does it mean to be in union?

931


Can we use max in where clause?

923


Distinguish between commit and rollback?

953


How to maintain a fill factor in existing indexes?

999


How many categories of functions based their return modes?

1101


What do mean by xml datatype?

1089


What is dirty read?

1077


What is blocking?

1056


What are subquery and its properties?

1042


What is the difference between varchar and nvarchar?

939


Can we insert data into a view?

1130


In which format does an image save in SQL Server database ?

994