fix(guide): simplify directory structure

This commit is contained in:
Mrugesh Mohapatra
2018-10-16 21:26:13 +05:30
parent f989c28c52
commit da0df12ab7
35752 changed files with 0 additions and 317652 deletions

View File

@ -0,0 +1,33 @@
---
title: SQL Delete Statement
---
## SQL Delete Statement
To delete a record in a table you use the `DELETE` statement.
Be careful. You can delete all records of the table or just a few. Use the `WHERE` condition to specify which records do you want to delete. The syntax is:
```sql
DELETE FROM table_name
WHERE condition;
```
Here is an example deleting from the table Person the record with Id 3:
```sql
DELETE FROM Person
WHERE Id = 3;
```
Using DELETE to remove all records from a given table
```sql
DELETE * FROM Person
;
```
Or depending on your RDBMS you could use the TRUNCATE TABLE statement which deletes all records from a table and depending on your RDBMS may or may not allow rollback. DELETE is DML and TRUNCATE is DDL.
```sql
TRUNCATE TABLE Person;
```