GeekInterview.com
Series: Subject: Topic:
Question: 306 of 377

what is the difference between rownum,rowid

Asked by: Interview Candidate | Asked on: Jul 26th, 2006

Editorial / Best Answer

Answered by: rishipahuja

View all answers by rishipahuja

Member Since Aug-2006 | Answered On : Aug 6th, 2006

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.

Showing Answers 1 - 9 of 9 Answers
Anurag puranik

Answered On : Jul 27th, 2006

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.

Yes  1 User has rated as useful.
  
Login to rate this answer.
rishipahuja

Answered On : Aug 6th, 2006

View all answers 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.

Yes  5 Users have rated as useful.
  
Login to rate this answer.
vidhya

Answered On : Aug 29th, 2006

Very good answer

  
Login to rate this answer.
lanka_satya

Answered On : Sep 12th, 2008

View all answers by lanka_satya

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.....

  
Login to rate this answer.
nalinbit

Answered On : Nov 24th, 2008

View all answers by nalinbit

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.

  
Login to rate this answer.

Rownum is the temp num assigned for the return rows per statement queryIt 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.

  
Login to rate this answer.
Vikram Simha Reddy

Answered On : Jan 8th, 2012

1. Rowid gives address of rows or records. Rownum gives count of records
2. Rowid is permanently stored in database. Rownum is not stored in database permanently
3. Rowid is automatically assigned with every inserted into a table. Rownum is an dynamic value automatically
retrieved along with select statement output.
4. It is only for display purpose.

  
Login to rate this answer.
Chittaranjan Kotian

Answered On : May 16th, 2012

ROWNUM is a pseudocolumn returning a sequential number along with the rows retrieved, whereas rowid (also a pseudocolumn) contains the actual physical address of the data block containing the row

  
Login to rate this answer.
Sunny

Answered On : Mar 25th, 2013

Row num is a sequential number allocated to each returned row for query execution. It is nothing but a numeric values. It is a temporary values. But row id is a physical address of the rows. It is permanent.

  
Login to rate this answer.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

Related Open Questions

Ads

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.