GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Oracle  >  Basics
Go To First  |  Previous Question  |  Next Question 
 Basics  |  Question 21 of 49    Print  
what is the difference between rownum,rowid

  
Total Answers and Comments: 6 Last Update: June 30, 2009     Asked by: senthil 
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: rishipahuja
 

rowid has a physical significance i.e you can read a row if you know rowid. It is complete physical address of a row.

While rownum is temporary serial number allocated to each returned row during query execution.



Above answer was rated as good by the following members:
shinymoon29
July 27, 2006 02:20:50   #1  
Anurag puranik        

RE: what is the difference between rownum,rowid

Rownum is just the serial No of your output while Rowid is automatically generated unique id of a row an it is generated at the time of insertion of row.

Rownum is numeric and rowid is 16 bit hexadecimal no.


 
Is this answer useful? Yes | No
August 06, 2006 03:55:29   #2  
rishipahuja Member Since: August 2006   Contribution: 2    

RE: what is the difference between rownum,rowid

rowid has a physical significance i.e you can read a row if you know rowid. It is complete physical address of a row.

While rownum is temporary serial number allocated to each returned row during query execution.


 
Is this answer useful? Yes | NoAnswer is useful 2   Answer is not useful 0Overall Rating: +2    
August 29, 2006 04:40:53   #3  
vidhya        

RE: what is the difference between rownum,rowid
very good answer
 
Is this answer useful? Yes | No
September 12, 2008 02:23:24   #4  
lanka_satya Member Since: January 2008   Contribution: 16    

RE: what is the difference between rownum,rowid
rownum is generated for the data retrieved and stored in an implicit cursor so depending on the outcum it may varry where as rowid is generated automatically for creation of every row hence forth if we want retrive a particular row in a table we can abosolutelt do that if we can give rowid.....
 
Is this answer useful? Yes | No
November 24, 2008 08:04:41   #5  
nalinbit Member Since: November 2008   Contribution: 3    

RE: what is the difference between rownum,rowid
rownum is a pseudo column which is generated for query data set at runtime. while rowid is the physical address of the row and hence definition suggest rowid for a row will never change but row num will always change.
 
Is this answer useful? Yes | No
June 30, 2009 08:42:17   #6  
venugopalreddy.net Member Since: June 2009   Contribution: 1    

RE: what is the difference between rownum,rowid
rownum is the temp num assigned for the return rows per statement query
It will change as per the query statement.
It can be used with 1 or < 10 id number .
Where as rowid is the id assigned by the
Oracle while creating record in database. It is permanent & we can query with sign & it will not change
or depend on query.

 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape