Returning in Postgres

  • The returning keyword is a way to return freshly inserted rows

INSERT INTO products (name, price, inventory) VALUES ('tortilla, 10, 10000) RETURNING;
  • This should insert the new values and return them

Last updated