No, not unique to PostgreSQL. Microsoft SQL Server has the OUTPUT
Clause. The major difference is MS has an extra feature that allows the
OUTPUT or some form of the output to be reused in yet another INSERT.
This would allow you to DELETE a block rows from table and insert them
into a work table for further processing.
Returns information from, or expressions based on, each row affected by
an INSERT, UPDATE, or DELETE statement. These results can be returned to
the processing application for use in such things as confirmation
messages, archiving, and other such application requirements.
Alternatively, results can be inserted into a table or table variable.
From: D. Dante Lorenso [mailto:dante@stripped]
Sent: Wednesday, October 15, 2008 3:11 PM
Subject: Re: Does MySQL have RETURNING in the language?
D. Dante Lorenso wrote:
> There's an awesome feature that was added to PostgreSQL a while back
> called RETURNING that allows you to make an INSERT, UPDATE, and DELETE
> statement behave like a SELECT statement.
> Does RETURNING exist in any current release of MySQL or is it on the
> TODO list even? If it's not, how can I go about asking to have it put
> on there?
For more information on RETURNING for INSERT statements, read a little
of this from the PostgreSQL documentation:
From what I can tell this is unique to PostgreSQL. I really want this
functionality in MySQL. Where do I go to ask for it?
D. Dante Lorenso
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql