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);
Subscribe to:
Post Comments (Atom)
VMware Cloud Learning Video's
Here is a nice summary list of all VMworld US 2018 Breakout session with the respective video playback & download URLs. Enjoy! Bra...
-
Different types of bra Welcome to this post, we are here to help you with the different types of bras out there and help you make the ...
-
Most of women now days are very conscious about their future. Time has changed now women are now doing much better than men in corporate w...
-
Mens Fashion Wear Hugo Boss is one of the leading designers of high-end menswear in the world today, but the company has a checkered ...
No comments:
Post a Comment