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
What are the difference between clustered and a non-clustered index?
What is difference between getdate and sysdatetime in sql server 2008?
Do you know what is raid and what are different types of raid configurations? : SQL Server Architecture
What is read committed?
What is the full form of ddl?
Explain sql delete command?
What are different types of roles provided by ssrs?
Explain the advantages of merge replication?
How global temporary tables are represented and its scope?
how would you store your query in an SSRS report or a Database server?
What are temporal tables in sql server 2016?
What are the lambda triggers?
Which are the olap features?
How to return the date part only from a sql server datetime datatype?
query processing