w3resource logo
SQL Tutorial

SQL Delete

SQL Delete records from a table

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;


Sql select re-ordering columns

SQL deleting records with where

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:

SQL Code

DELETE FROM customer1
    WHERE cust_country='Canada';


Sql select re-ordering columns

See our Model Database

Practice SQL Exercises

Want to improve the above article? Contribute your Notes/Comments/Examples through Disqus.

Amazon promo codes to get huge discounts for limited period (USA only).