The SQL DELETE Query is used to delete the existing records from a table.
Can use WHERE clause with DELETE query to delete selected rows, otherwise all the records would be deleted.
SYNTAX:
DELETE FROM table_name
WHERE {CONDITION};
EXAMPLE:
TO delete a customer, whose ID is 6
DELETE FROM CUSTOMERS WHERE ID = 6;
To DELETE all the records from CUSTOMERS table
DELETE FROM CUSTOMERS;
No comments:
Post a Comment