In this article I would like to explain ‘What is ROWID and ROWNUM in SQL?’. Pseudocolumns are actually associated with the table data but it has nothing to do with table data.ROWID & ROWNUM are Pseudocolumns which are not actual columns in the table but behave like actual columns. You can select the values from Pseudocolumns like ROWID & ROWNUM.ROWID & ROWNUM are very important Pseudocolumns in oracle which is used in data retrieval.
CLICK HERE TO GET 20 MOST IMPORTANT COMPLEX SQL QUERIES..
Pseudocolumns are nothing but logical columns which behaves like a physical columns in database.
CLICK HERE TO GET 20 IMPORTANT QUESTIONS ON PERFORMANCE TUNING
Example:- select rowid from dual;
AAAAECAABAAAAgiAAA
Example:
Select Rownum from dual;
Answer- 1
So in above article we have dicussed the difference between ROWID & ROWNUM.Following is the difference between ROWID & ROWNUM in tabular format:
ROWID | ROWNUM |
1.ROWID is nothing but Physical memory allocation
2.ROWID is permanant to that row which identifies the address of that row. 3.ROWID is 16 digit Hexadecimal number which is uniquely identifies the rows. 4.ROWID returns PHYSICAL ADDRESS of that row. 5. ROWID is automatically generated unique id of a row and it is generated at the time of insertion of row. 6. ROWID is the fastest means of accessing data. |
1. ROWNUM is nothing but the sequence which is allocated to that data retreival bunch.
2. ROWNUM is tempararily allocated sequence to the rows. 3.ROWNUM is numeric sequence number allocated to that row temporarily. 4.ROWNUM returns the sequence number to that row. 5. ROWNUM is an dynamic value automatically 6.ROWNUM is not related to access of data. |
Hope you like this article on What is ROWID and ROWNUM in SQL? . Kindly comment if any suggestions .
CLICK HERE TO GET 20 SQL INTERVIEW QUESTIONS FOR FRESHER..
Introduction Cryptocurrencies took the world by storm, setting up a new financial system and breaking…
In my previous article I have given Top 20 technical support interview questions with its…
In my previous articles I have given 15 most asked desktop support interview questions with…
A business analyst is someone who is versed in processes of data analysis used for…
In my previous article I have already given top questions and answers for Desktop support…
In my previous article I have given unix production support interview questions and answers. In…