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
Can we linked SharePoint to a SQL database?
What is the use of set nocount on/off statement?
Explain identity in sql server?
How to check if stored procedure is running in sql server?
Can we check locks in database? If so, how can we do this lock check?
What is the usage of the sign function?
What is NOT NULL Constraint in sql server 2012?
what is isolation level at dead lock?
What is the contrast between sql and pl/sql?
What is ms sql server triggers?
what is a check constraint?
What are scalar functions in sql?
What is Cross Join and in which scenario do we use Cross Join?
How to concatenate two binary strings together?
How will you make an attribute not process? : sql server analysis services, ssas