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.

http://msdn.microsoft.com/en-us/library/ms177564(SQL.90).aspx 

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.

Ed

-----Original Message-----
From: D. Dante Lorenso [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 15, 2008 3:11 PM
To: [EMAIL PROTECTED]
Cc: mysql@lists.mysql.com
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:

   http://www.postgresql.org/docs/8.3/interactive/sql-insert.html

 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?

-- Dante

----------
D. Dante Lorenso
[EMAIL PROTECTED]


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to