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
What is the minimum recommended amount of ram for sql server 2012 enterprise?
How to stop log file growing too big?
What happens when converting big values to numeric data types?
What does it mean to be in union?
Can we use max in where clause?
Distinguish between commit and rollback?
How to maintain a fill factor in existing indexes?
How many categories of functions based their return modes?
What do mean by xml datatype?
What is dirty read?
What is blocking?
What are subquery and its properties?
What is the difference between varchar and nvarchar?
Can we insert data into a view?
In which format does an image save in SQL Server database ?