SQL
UPDATE Statement

UPDATE statement is used to edit the records of a table.

with WHERE

Syntax
                    

 

    UPDATE table_name
    SET column1 = value1, column2 = value2, ...
    WHERE condition;

Example
                    

  UPDATE Customers
	SET CustomerName = 'john', City= 'Austria'
	WHERE CustomerID = 6;

without WHERE

Whenever we use UPDATE Statement without WHERE clause it will Update all the records in the table.

Syntax
                    


    UPDATE table_name
    SET column1 = value1, column2 = value2...;

Example
                    

 

  UPDATE Customers
  SET CustomerName='john';