Beginner

715. DELETE

Learn how to remove records from a database table using the DELETE statement.

📘 Lesson 714 of 728 ⏱ 7 min 🎯 Beginner

DELETE is a Data Manipulation Language (DML) command used to remove one or more rows from a table. If no WHERE clause is specified, every record in the table is deleted while the table structure remains unchanged.

Business data sometimes becomes outdated or unnecessary. DELETE allows organizations to remove obsolete, incorrect, or duplicate records while keeping the table available for future data.

An employee resigns from the company, so the employee's record is removed from the Employees table.

SQL
DELETE FROM Employees
WHERE EmployeeID = 101;

DELETE is commonly used in HR systems, banking applications, e-commerce platforms, hospital management systems, inventory software, and CRM applications to remove unwanted records.

  • Removes records from a table.
  • It is a DML command.
  • Supports the WHERE clause.
  • Can delete one or multiple rows.
  • Does not remove the table structure.
  • Can be rolled back within a transaction.
  • Always verify records before deleting.
Which SQL statement removes records from a table?

The DELETE statement removes one or more records from a table.

What happens if DELETE is executed without a WHERE clause?

Every row in the table is deleted while the table structure remains.

Have you finished this lesson?

Introduction to SQL – All Lessons