SyntaxFix
Write A Post
Hire A Developer
Questions
You can use RETURNING id after insert query.
INSERT INTO distributors (id, name) VALUES (DEFAULT, 'ALI') RETURNING id;
and result:
id ---- 1
In the above example id is auto-increment filed.