Home » Developer & Programmer » Forms » compare two tables with rowid?
compare two tables with rowid? [message #600130] Fri, 01 November 2013 03:04 Go to next message
sanjlaxmi
Messages: 24
Registered: October 2013
Junior Member
is it possible to compare two tables with rowid?
i want to put rowid in where condition...how can we do this?
pls give me solution over this...
Re: compare two tables with rowid? [message #600131 is a reply to message #600130] Fri, 01 November 2013 03:17 Go to previous messageGo to next message
John Watson
Messages: 8931
Registered: January 2010
Location: Global Village
Senior Member
Do you mean something like this:
orclz>
orclz> conn scott/tiger
Connected.
orclz> select rowid,deptno from dept;

ROWID                  DEPTNO
------------------ ----------
AAAWtfAAGAAAAC0AAA         10
AAAWtfAAGAAAAC0AAB         20
AAAWtfAAGAAAAC0AAC         30
AAAWtfAAGAAAAC0AAD         40

orclz>
orclz>
orclz>
orclz> select * from dept where rowid='AAAWtfAAGAAAAC0AAD';

    DEPTNO DNAME          LOC
---------- -------------- -------------
        40 OPERATIONS     BOSTON

orclz>
Re: compare two tables with rowid? [message #600132 is a reply to message #600131] Fri, 01 November 2013 03:37 Go to previous messageGo to next message
sanjlaxmi
Messages: 24
Registered: October 2013
Junior Member
i want to compare two tables with rowid becaz table don hav any primary key...is it possible two tables will hav same rowid??
i am doin this on key-comit
i tried to put condition in where clause bt it giving error like this...key-commit trigger raised unhandled exception ORA-01410..
Re: compare two tables with rowid? [message #600134 is a reply to message #600132] Fri, 01 November 2013 03:43 Go to previous messageGo to next message
cookiemonster
Messages: 13920
Registered: September 2008
Location: Rainy Manchester
Senior Member
rowed is the physical location of the row on the blocks on disk.
So no, two tables will not have the same rowid and you can't use it to compare tables.
Re: compare two tables with rowid? [message #600139 is a reply to message #600134] Fri, 01 November 2013 04:55 Go to previous message
mughals_king
Messages: 392
Registered: January 2012
Location: pakistan
Senior Member
Read About ROWID

http://www.orafaq.com/wiki/ROWID

http://docs.oracle.com/cd/B19306_01/server.102/b14200/pseudocolumns008.htm

Regard
Mughal

[Updated on: Fri, 01 November 2013 05:27]

Report message to a moderator

Previous Topic: browse option in oracle forms
Next Topic: Multiple choice or all
Goto Forum:
  


Current Time: Fri Apr 26 03:30:57 CDT 2024