Part 46: Deleting Rows with DELETE FROM & Filtered Deletions
Removing specific rows matching criteria.
1. Syntax
DELETE FROM shopping_cart_items
WHERE created_at < CURRENT_TIMESTAMP - INTERVAL '30 days';
Key Takeaways
- Always supply an explicit
WHEREclause. - For large deletions (>1,000,000 rows), delete in smaller batches to avoid long lock times.
In Part 47, we analyze Soft Deletes vs Hard Deletes: Design Patterns!

