Back to Browse

PostgreSQL RETURNING UID tip

5 views
Feb 20, 2026
0:20

My favorite little-known feature of PostgreSQL is the "RETURNING UID". When doing an INSERT add at the end "RETURNING" and the primary column name. It will both insert a row and return the auto-incremented primary key value. #PostgreSQL

Download

1 formats

Video Formats

360pmp4495.1 KB

Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.

PostgreSQL RETURNING UID tip | NatokHD