UPDATE statement is used for modifying the existing records in a table. The UPDATE command specifies the rows to be changed using the WHERE clause and the new data using the SET keyword.
Syntax:
UPDATE <table name>
SET <fieldname> = <value or expression>
WHERE <criteria>
UPDATE | ALTER |
---|---|
It modifies the existing data of a database | It modifies existing structure of database |
It is DML | It is DDL |
It can only modify one or more records in a table | It can add, delete or modify column of a table. |