Re: Question for you Oracle Guru's -- conversion of SQL to Ora

From: bagieta <bagieta21_at_poczta.onet.pl>
Date: Tue, 21 Dec 2004 22:09:50 +0100
Message-ID: <cqa3el$ch0$1_at_opal.icpnet.pl>


[Quoted] I'm not a Oracle guru, but I use rowid sometimes and can tell you about it that what I know.

> table. I know RowId exists in Oracle but I have forgotten how to use
> it, i.e. do I have to maintain a sequence in pl/sql to use it?

No you don't have to use any sequence.
You can use rowid in query just like identity:

MSSQL - select _at__at_identity, t.* from table t ORACLE - select rowid, t.* from table t

you can do now something like

update table
set
col1 = :col1,
col2 = :col2
where
rowid = :old_rowid

Remember that rowid is unique for the given query (it is not like oid in postgresql - unique for any table tuple). So when you finish your transaction and then call SELECT once again then the rowid value will be different.

--
Regards Bagieta
~~~~~~~~~~~~~~~~~~~~~~~~~~~
dbDeveloper - Multiple databases editor
http://www.prominentus.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Received on Tue Dec 21 2004 - 22:09:50 CET

Original text of this message