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.


Table Name 'customers'

id

name

age

city

bill

1Tom34Paris5300
2Jhony51London 400
3Ram64Delhi20000.7
4Simon23Portland32.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;