Sql Query to Delete Records


To delete only the record of the existing created table with a special condition. Then we can use a ' DELETE TABLE ' statement.

Without where conditions it will delete all records. (Not Recommended)

Use Where condition to delete records.

Enter - Select * from table_name;
SQL Query
SELECT 'Before Delete'; SELECT * FROM regions; SELECT 'Using Where Conditions'; DELETE FROM regions WHERE region_id = 1; SELECT 'After Delete'; SELECT * FROM regions; SELECT 'Without using Where Conditions'; DELETE from regions; SELECT 'After Delete'; SELECT * FROM regions;
Output