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 difference between DataRow.Delete() and DataRow.Remove()?
Explain “@@rowcount” and “@@error” in sql server?
What is difference between index and primary key?
How many replicas are maintained for each sql azure db?
What are key, name and value columns of an attribute? : sql server analysis services, ssas
What is the maximum number of index per table?
my name is sejal I have cleared the sbi clerk exam. I am BCA graduate My favorite subject RDBMS Relational database management system. so please send me rRDBMS related interview questions
What is a schema in ms sql server 2005?
What does set rowcount do?
What is bookmark link in ssrs?
What is molap and its advantage? : sql server analysis services, ssas
What authentication modes does sql server support?
Explain index in sql server?
Can you explain about buffer cash and log cache in sql server?
How to access the inserted record of an event?