Need Assistance?

support@tutorialshub.in

CRUD Operations & Upserts

INSERT & The RETURNING * Clause

ADVERTISEMENT
PostgreSQL Free Lesson
5 min read
ADVERTISEMENT

One of PostgreSQL's best quality-of-life features is RETURNING * (or RETURNING id). Instead of running an INSERT followed by a separate SELECT to get the generated ID and timestamps, PostgreSQL returns the inserted row in one round trip!

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