DatabaseLesson 13Free preview
PostgreSQL DELETE
This lesson is part of PostgreSQL · All levels
Summary
The DELETE command removes the row from the table based on the given WHERE condition. Without WHERE, the entire row of the table will be deleted, so always include the limiting condition. To empty a large table at once, a faster TRUNCATE command is available.
Key points
- Delete From Without Where deletes the entire row on the table.
- Always include WHERE so that only the desired line is deleted.
- TRUNCATE empties the entire row quickly without deleting the table.
- Run in the deal so you can ROLLBACK when you miss a target.
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.