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 / justus

update tablename set salary=100 where salary is null

Is This Answer Correct ?    6 Yes 10 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What the difference between UNION and UNIONALL?

574


What is the use of tempdb? What values does it hold?

568


What are the aggregate and scalar functions?

527


Give the query of getting last two records from the table in SQL SERVER?

542


In my application I have a process which picks the scanned files (tif format) from a shared location and it links to application and shown on it.The actuall issue is that my process picks the file before it is completly written or scanned which results in displaying few parts of the image or incomplete image.I need to check if the file is not completly scanned or written then do not link it to application.Please help if any body tell me that how can i check that file is in written phase or locked through DTS.thanking you in advance

1560






What is fill factor and pad index?

542


what are defaults? : Sql server database administration

522


what is a join? : Sql server database administration

547


List the advantages of using stored procedures?

563


Explain how to use linked server?

568


What is function of ROLLUP ?

658


Tell me what is difference between view and materialized view?

523


What command is used to delete a table from the database in the sql server and how?

544


What are the properties and different types of sub-queries?

565


You want to implement the one-to-one relationship while designing tables. How would you do it?

534