SQL – UPDATE
SQL Update Query
SQL – UPDATE Statement is used to update or change the records in table which are existing in the table.
SQL Update Query with Syntax
UPDATE TableName
SET columnName1 = newValue1,
SET columnName2 = newValue2,
SET columnName3 = newValue3
WHERE columnName = someColumnValue;
SET columnName1 = newValue1,
SET columnName2 = newValue2,
SET columnName3 = newValue3
WHERE columnName = someColumnValue;
Suppose We have Following Data :
Update Example :
Example
UPDATE USERS SET Name = ‘David Camron’ , City=”NEW LONDON” WHERE Email= ‘david@yahoo.com’;
The Above Query Will Update the row where email is ‘david@yahoo.com’ the update data will be as :
Advertisements
Add Comment
📖 Read More
- 1. SQL - DELETE
- 2. SQL - Like
- 3. SQL In Operator
- 4. SQL Between
- 5. SQL Joins - INNER JOIN
- 6. SQL - LEFT JOIN
- 7. SQL - RIGHT JOIN
- 8. SQL - FULL JOIN
- 9. SQL - UNIQUE Key
- 10. SQL PRIMARY Key