ROWNUM and ROWID
What is ROWNUM and ROWID ??
First of all, both are covered in the SQL Reference, "Basic Elements of Oracle SQL", Chapter 2:
http://download-west.oracle
They are also both referred to as pseudo-columns. That is, they are not "real" columns that will show up when you DESC a table. They don't actually exist anywhere in the database. But they're available for you to use.
In fact, ROWNUM only exists for a row once it is retrieved from a query. It represents the sequential order in which Oracle has retrieved the row. Therefore it will always exist, be at least 1, and be unique (among the rows returned by the query). Obviously it will change from query-to-query.
What about ROWID?
ROWID actually represents the physical location of the record/row in the database. That being the case, it is (according to Oracle documentation) the fastest way to retrieve a particular row. Faster than an index, even.
[source : http://thinkoracle.blogspot.com/2005/10/rownum-and-rowid.html]
: techieydreamz :

0 Comments:
Post a Comment
<< Home