The *SQL DELETE* command is used to remove existing records from a table. It's a
powerful tool, but it must be used with caution to avoid accidental data loss.
---
*Basic Syntax:*
```sql
DELETE FROM table_name
WHERE condition;
```
- *table_name*: The name of the table from which you want to delete records.
- *condition*: A condition that determines which records will be deleted. If this clause is
omitted, *all records* from the table will be deleted!
---
*Example 1: Deleting a Single Record*
To delete a single record from a table, you can use the *WHERE* clause to specify the
condition. For example, if you want to delete the employee with an ID of 101 from the
*employees* table, you would use the following SQL statement:
```sql
DELETE FROM employees
WHERE id = 101;
```
This command deletes the record where the *id* is 101.
You can verify the deletion by running a *SELECT* statement:
```sql
SELECT * FROM employees;
```
This will show you the remaining records in the *employees* table after the deletion.
---
*Example 2: Deleting All Records*
If you omit the *WHERE* clause, all records in the table will be deleted. Be very careful
with this, as it will remove *all* data from the table, and there is no confirmation or
warning from SQL.