#768

Get the new user's id right after insert

You're registering a new customer and want to grab their generated identifier immediately — to attach a first order or show it in the UI. A second query just for that is a wasted round-trip. Add a new customer named «Петя» to customers and, in the same statement, return the generated id along with the name — no separate SELECT.

Expected output sample

This is what a correct answer looks like — its row count is its own, it doesn't have to match the schema tables.

idname
5Петя

Your query result will appear here

Focus radio
Paused · SomaFM · Fluid