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 are the different ways of moving data/databases between servers and databases in sql server? : Sql server database administration
how to overcome kernel isssues
What is the sql server agent?
Explain the microsoft sql server delete command? : SQL Server Architecture
What is explicit mode in sql server?
What is database mirroring?
What is an execution plan? How would you view the execution plan?
How do database indexes work?
What it means to be triggered?
Can you explain different types of joins?
Explain SSRS Architecture?
Explain the difference between control flow and data flow?
What are the types of sql server?
How to count duplicated values in a column in ms sql server?
What are the different types of locks in the database?