Your SlideShare is downloading. ×
Sql update statement
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Sql update statement

41

Published on

Published in: Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
41
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
1
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. 8/10/13 SQL Update Statement beginner-sql-tutorial.com/sql-update-statement.htm 1/1 SQL UPDATE Statement The UPDATE Statement is used to modify the existing rows in a table. The Syntax for SQL UPDATE Command is: UPDATE table_name SET column_name1 = value1, column_name2 = value2, ... [WHERE condition] table_name - the table name which has to be updated. column_name1, column_name2.. - the columns that gets changed. value1, value2... - are the new values. NOTE:In the Update statement, WHERE clause identifies the rows that get affected. If you do not include the WHERE clause, column values for all the rows get affected. For Example: To update the location of an employee, the sql update query would be like, UPDATE employee SET location ='Mysore' WHERE id = 101; To change the salaries of all the employees, the query would be, UPDATE employee SET salary = salary + (salary * 0.2);

×