Explain UPDATE statement in SQL Server.
The UPDATE statement is used to modify the data in a database table.
Ex :
Update Employees set EmployeeName = ‘Peter Heines’ where EmployeeName = ‘Peter’
This Query will modify the Employee name “Peter” into “Peter Heines”.
The data can be updated in several columns like,
Update Employees set Address = ‘134 Gandhi Nagar’ , City = ‘Bangalore’ where EmployeeName = ‘James Roguer’
This Query will modify the Address and City of the Employee with name “James Roguer”.
Ex :
Update Employees set EmployeeName = ‘Peter Heines’ where EmployeeName = ‘Peter’
This Query will modify the Employee name “Peter” into “Peter Heines”.
The data can be updated in several columns like,
Update Employees set Address = ‘134 Gandhi Nagar’ , City = ‘Bangalore’ where EmployeeName = ‘James Roguer’
This Query will modify the Address and City of the Employee with name “James Roguer”.
Labels: UPDATE statement in SQL Server
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home