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 / dinesh sharma

It Simple
Just Write Down The Query
update table_Name set salary=100 where salary is null

Is This Answer Correct ?    12 Yes 28 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is cached report?

106


What are the events recorded in a transaction log?

504


How to insert multiple rows with a subquery?

528


What are statistics?

566


What is table valued function and scalar valued functions?

487






What are the results of running this script?

509


What is the dbcc command and why is it used?

567


What is a file group?

612


Explain the properties of subqueries in sql server?

538


Explain log shipping?

581


what is sql server? : Sql server database administration

532


Does an index slow down updates on indexed columns?

577


What are the options which must be set to allow the usage of optimistic models?

511


What command is used to create a database in the sql server and how?

600


How to encrypt data between dialogs?

570