Home » SQL & PL/SQL » SQL & PL/SQL » HOW TO STORE ROWID DATA BY USING ROWID DATA TYPE? (oracle 11g)
icon11.gif  HOW TO STORE ROWID DATA BY USING ROWID DATA TYPE? [message #643589] Tue, 13 October 2015 02:09 Go to next message
graphe
Messages: 23
Registered: October 2014
Junior Member

HOW TO STORE ROWID DATA BY USING ROWID DATA TYPE?
Can anybody please explain briefly.
Re: HOW TO STORE ROWID DATA BY USING ROWID DATA TYPE? [message #643590 is a reply to message #643589] Tue, 13 October 2015 02:30 Go to previous messageGo to next message
cookiemonster
Messages: 13975
Registered: September 2008
Location: Rainy Manchester
Senior Member
Store where for what purpose?
Re: HOW TO STORE ROWID DATA BY USING ROWID DATA TYPE? [message #643591 is a reply to message #643589] Tue, 13 October 2015 02:31 Go to previous messageGo to next message
Michel Cadot
Messages: 68776
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator

Can you read the documentation we already pointed you several times instead of relying on our help and taking time we could spend for other people with real issue?

Re: HOW TO STORE ROWID DATA BY USING ROWID DATA TYPE? [message #643596 is a reply to message #643589] Tue, 13 October 2015 05:30 Go to previous messageGo to next message
clq01
Messages: 1
Registered: October 2015
Junior Member
Rowid is more less a physical address. Not really a safe reference.

create table tst (a rowid);
create table tst2 as select 1 a from dual;
insert into tst select rowid from tst2;
commit;
select * from tst2 where rowid in (select a from tst);




[Edit MC: unrelated url removed]

[Updated on: Tue, 13 October 2015 05:47] by Moderator

Report message to a moderator

Re: HOW TO STORE ROWID DATA BY USING ROWID DATA TYPE? [message #643604 is a reply to message #643596] Tue, 13 October 2015 07:28 Go to previous messageGo to next message
cookiemonster
Messages: 13975
Registered: September 2008
Location: Rainy Manchester
Senior Member
To be clear - it's not at all safe to do that as rowids can change over time.
The won't change for the duration of a transaction - WHERE CURRENT OF with cursors wouldn't work otherwise - so you can use them within a transaction but you certainly shouldn't hold onto them past that.
Re: HOW TO STORE ROWID DATA BY USING ROWID DATA TYPE? [message #643605 is a reply to message #643589] Tue, 13 October 2015 07:33 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
graphe wrote on Tue, 13 October 2015 00:09
HOW TO STORE ROWID DATA BY USING ROWID DATA TYPE?
Can anybody please explain briefly.



When all else fails, Read The Fine Manual

https://docs.oracle.com/apps/search/search.jsp?category=database&product=e50529-01&q=rowid
Re: HOW TO STORE ROWID DATA BY USING ROWID DATA TYPE? [message #643607 is a reply to message #643605] Tue, 13 October 2015 08:53 Go to previous message
Bill B
Messages: 1971
Registered: December 2004
Senior Member
Rowid is a great pointer when you are in a cursor, but never store the rowid in a table. Like cookiemonster said, as you use the table they may change their physical location.
Previous Topic: groups in regexp_instr
Next Topic: How To See Latest created Table Including Time in oracle. Is there any table for it?
Goto Forum:
  


Current Time: Sun Jul 19 02:05:40 CDT 2026