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 does <> symbol mean?
What is Transparent Data Encryption?
What is the new security features added in sql server 2016? : sql server security
What are the differences between clustered and non-clustered index?
Where do we use trace frag?
Does sql server 2000 full-text search support clustering?
What are the properties of the relational tables?
How do we upgrade from SQL Server 6.5 to 7.0 and 7.0 to 2000?
What is temporary stored procedure?
Your table has a large character field there are queries that use this field in their search clause what should you do?
Explain features and concepts of analysis services?
what types of replication are supported in sql server? : Sql server database administration
Explain nested join?
What is the partitioning method?
Once setting replication, can you have distributor on sql server 2005, publisher of sql server 2008?