What is the difference between rownum,rowid

Editorial / Best Answer

rishipahuja  

  • Member Since Aug-2006 | 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

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

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.

vidhya

  • Aug 29th, 2006
 

very good answer

  Was this answer useful?  Yes

lanka_satya

  • Sep 12th, 2008
 

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

  Was this answer useful?  Yes

nalinbit

  • Nov 24th, 2008
 

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.

  Was this answer useful?  Yes

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.

  Was this answer useful?  Yes

Vikram Simha Reddy

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

  Was this answer useful?  Yes

Chittaranjan Kotian

  • 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

  Was this answer useful?  Yes

Sunny

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

  Was this answer useful?  Yes

Give your answer:

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

Answer Question

Click here to Login / Register your free account


 
Send   Reset

 

Related Answered Questions

 

Related Open Questions