Check out example codes for "return insert results in POSTGRESQL". It will help you in understanding the concepts better.

Code Example 1

# to select specific columns
INSERT INTO users (firstname, lastname) VALUES ('Joe', 'Cool') RETURNING id, firstname;
# to return every column
INSERT INTO users (firstname, lastname) VALUES ('Joe', 'Cool') RETURNING *;

Learn ReactJs, React Native from akashmittal.com