The SQL DELETE command is used to delete rows or records from a table.
Sample tables associated with this page have shown bellow:
Sample table : daysorder
Sample table : customer1
To remove all rows from the table 'daysorder', the following SQL statement can be used :
DELETE FROM daysorder;
In this page, we are going to discuss, how the WHERE clause along with SQL DELETE command can be used to remove number of rows against some conditions.
To remove rows from the table 'customer1' with the following condition -
1. 'cust_country' must be 'Canada',
the SQL statement can be used :
DELETE FROM customer1 WHERE cust_country='Canada';
Help the community: