What is the OUTPUT clause in SQL Server and how does it differ from PostgreSQL’s RETURNING?

Advanced SQL Developer Hard

Advanced SQL Developer — Hard

What is the OUTPUT clause in SQL Server and how does it differ from PostgreSQL’s RETURNING?

Key points

  • SQL Server's OUTPUT can insert results into a table variable, which RETURNING cannot do
  • Both clauses return affected row data from DML operations
  • OUTPUT is specific to SQL Server, while RETURNING is specific to PostgreSQL

Ready to go further?

Related questions