Need Assistance?

support@tutorialshub.in

Constraints & Data Integrity

FOREIGN KEY & Cascading Actions

ADVERTISEMENT
PostgreSQL Free Lesson
5 min read
ADVERTISEMENT

REFERENCES links child rows to parent rows. Choose ON DELETE CASCADE to auto-delete child rows when the parent is deleted, ON DELETE SET NULL to keep orphan history, or RESTRICT (default) to block accidental parent deletion.

ADVERTISEMENT
Hi, I'm Tuby! Here to help you