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 are sp_configure commands and set commands?

566


What are the extra roles available in msdb? : sql server security

644


Explain atomicity?

579


How to convert binary strings into integers in ms sql server?

559


Which database stores information about replication?

559






You are designing a database for your human resources department in the employee table, there is a field for social security number, which cannot contain null values if no value is given, you want a value of unknown to be inserted in this field what is the best approach?

627


What is side by side migration in sql server?

545


What is the difference between the export /import functions in sql studio and standalone sql manager? : sql server management studio

591


Are all views updatable ?

728


How to provide values to user defined function parameters?

557


What is database replication?

578


What is the default server name for sql server?

643


Do you know what are the properties of the relational tables?

577


What are the advantages of user-defined functions over stored procedures in sql server?

464


How to provide default values to stored procedure parameters?

578