What does the RETURNING clause do in PostgreSQL INSERT, UPDATE, or DELETE statements?

Advanced SQL Developer Hard

Advanced SQL Developer — Hard

What does the RETURNING clause do in PostgreSQL INSERT, UPDATE, or DELETE statements?

Key points

  • RETURNING clause eliminates the need for a separate SELECT query
  • Facilitates access to affected row values directly
  • Enhances efficiency by reducing the number of queries required

Ready to go further?

Related questions