Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Get the RowID of the last insert
Sam Hwang wrote:
> Is it RETURNING clause a proprietary statement of Oracle? If so, how
> to achieve the same effect in MySql or Sql Server?
>
SQL Server 2005 has a similar clause with different syntax, but the
target must be a temp table. mySQL I do not know.
If you try to write portable code I would refrain from ROWID all
together. The whole concept is not covered by the SQL standard and each
vendor has different semantics. Also you may or may not see the
performance you expect.
Especially the duration within which you can rely on ROWID to pin your
row is undefined.
Cheers
Serge
PS: I wasn't aware SQL Server has ROWID (?)
-- Serge Rielau DB2 Solutions Development IBM Toronto LabReceived on Mon Mar 26 2007 - 07:31:18 CDT