The REPLACE statement is just like INSERT , but it overwrites rows where a key clash occurs. INSERT fails or triggers the ON DUPLICATE KEY UPDATE clause when a key clash occurs.
Deleting Data
Avoid disasters with --i-am-a- dummy .
Delete data from tables with the DELETE statement:
DELETE [LOW_PRIORITY] [QUICK] FROM table_name [WHERE where_definition ] [ORDER BY ...] [LIMIT rows ] or DELETE [LOW_PRIORITY] [QUICK] table_name [.*] [, table_name [.*] ...] FROM table-references [WHERE where_definition ] or DELETE [LOW_PRIORITY] [QUICK] FROM table_name [.*] [, table_name [.*] ...] USING table-references [WHERE where_definition ]
The TRUNCATE TABLE statement deletes all rows from a table.
Updating Data
Update data in tables with the UPDATE TABLE statement: