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
Explain about link server in sql server?
What is the difference between a local and a global temporary table?
What are the restrictions while creating batches in sql server?
How to insert a new row into a table with "insert into" statements in ms sql server?
How we create SQL Server 2005 Reporting Services ? Give me Sample
What are xml indexes?
What is ms sql server service broker?
Explain the first normal form(1nf)?
Tell me what is the stuff and how does it differ from the replace function?
What are the types of lock supported by ?
what are the critical issues you have resloved in your company
How to create a new schema in a database?
Explain how to maintain a fill factor in existing indexes?
What the different types of Replication and why are they used?
Where sql server usernames and passwords are stored in a sql server?