SQL Update
UPDATE statement is used to update existing records in a table.SYNTAX :
UPDATE table_name SET column1=value, column2=value2,... WHERE some_column=some_value
Must Read:
Where clause in the above syntax means that the changes will be reflected by update in only those rows in which codition is satisfied.
id | name | age | city | bill |
1 | Tom | 34 | Paris | 5300 |
2 | Jhony | 51 | London | 400 |
3 | Ram | 64 | Delhi | 20000.7 |
4 | Simon | 23 | Portland | 32.65 |
Example 1 : Example to Update Single column
UPDATE customers SET name='Adward' WHERE ID = 1;
Example 2 :Example to Update multiple columns
UPDATE customers SET name='Adward' , city='Delhi' WHERE ID = 1;