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
What the difference between UNION and UNIONALL?
What is the use of tempdb? What values does it hold?
What are the aggregate and scalar functions?
Give the query of getting last two records from the table in SQL SERVER?
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
What is fill factor and pad index?
what are defaults? : Sql server database administration
what is a join? : Sql server database administration
List the advantages of using stored procedures?
Explain how to use linked server?
What is function of ROLLUP ?
Tell me what is difference between view and materialized view?
What command is used to delete a table from the database in the sql server and how?
What are the properties and different types of sub-queries?
You want to implement the one-to-one relationship while designing tables. How would you do it?