Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: Question for you Oracle Guru's -- conversion of SQL to Ora

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@opal.icpnet.pl>


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 @@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 - 15:09:50 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US