GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Oracle  >  PL/SQL
Go To First  |  Previous Question  |  Next Question 
 PL/SQL  |  Question 100 of 241    Print  
explian rowid,rownum?what are the psoducolumns we have?

  
Total Answers and Comments: 8 Last Update: October 09, 2009     Asked by: suribabu 
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: krish
 

ROWID - Hexa decimal number each and every row having unique.Used in searching

ROWNUM - It is a integer number also unique for sorting Normally TOP N Analysys.

Other Psudo Column are

NEXTVAL,CURRVAL Of sequence are some exampls

askrish@hotmail.com



Above answer was rated as good by the following members:
harit79, kperumal75, jabir.mkk
July 28, 2006 07:37:20   
krish        

RE: explian rowid,rownum?what are the psoducolumns we ...

ROWID - Hexa decimal number each and every row having unique.Used in searching

ROWNUM - It is a integer number also unique for sorting Normally TOP N Analysys.

Other Psudo Column are

NEXTVAL CURRVAL Of sequence are some exampls

askrish@hotmail.com


 
Is this answer useful? Yes | NoAnswer is useful 3   Answer is not useful 0Overall Rating: +3    
August 01, 2006 08:44:45   
D. Madhusudhana Rao ( 9885626575)        

RE: explian rowid,rownum?what are the psoducolumns we ...

psoducolumn in the sence which is not created by the user explicitly but user can use those things explicityly.

examples

rowid rowno currval nextval sysdate uid level.

RowID: While storing in the database oracle generates one id for each row.

you can call based upon the rowid .ex: select * from emp where rowid ....

RowNo : This no is also generated by oracle itself. but you cant call based upon this one in select clause


 
Is this answer useful? Yes | No
August 14, 2006 06:47:40   
Sphurti        

RE: explian rowid,rownum?what are the psoducolumns we ...

I would like to add one more point here

Rowid is permanent for the life time whereas rownum is not. What i mean is till the time the record is present in the table the value of ROWID of a particular row in a table will always be same whereas the value of ROWNUM will vary.


 
Is this answer useful? Yes | No
September 04, 2006 22:41:55   
Gyaneshwar VC        

RE: explian rowid,rownum?what are the psoducolumns we ...
Even ROWID is also not permanent for life time.Because If one exports and imports the table data then ROWID changes.
 
Is this answer useful? Yes | No
February 22, 2007 17:05:26   
sunflower        

RE: explian rowid,rownum?what are the psoducolumns we ...
Rowid is a unique identifier when a row is inserted into the table it generates a row id and will be removed when the row is deleted.

For each row returned by the query a Rownum pseudocolumn is returned in which order oracle selects the rows from the table. Using rownum one can even limit the number of rows selected from the table.

Ex: select * from emp where rownum<10;

 
Is this answer useful? Yes | No
July 19, 2007 07:42:12   
askvenki Member Since: July 2007   Contribution: 18    

RE: explian rowid,rownum?what are the psoducolumns we ...
rowid is hexadecimal format which is parmently stored with row
rownum while retreivng data oracle attach row num for each row

 
Is this answer useful? Yes | No
February 04, 2008 11:21:37   
g_sidhu Member Since: August 2007   Contribution: 122    

RE: explian rowid,rownum?what are the psoducolumns we have?

Row id: Hexadecimal string representing the unique address of a row in its table. This datatype is primarily for values returned by the ROWID pseudocolumn.

Rownum: For each row returned by a query the ROWNUM pseudocolumn returns a number indicating the order in which Oracle selects the row from a table or set of joined rows. The first row selected has a ROWNUM of 1 the second has 2 and so on. You can use ROWNUM to limit the number of rows returned by a query as in this example:

SELECT * FROM employees WHERE ROWNUM < 10;

A pseudocolumn behaves like a table column but is not actually stored in the table. You can select from pseudocolumns but you cannot insert update or delete their values. This section describes these pseudocolumns:

- CURRVAL and NEXTVAL

- LEVEL

- ROWID

- ROWNUM


 
Is this answer useful? Yes | No
October 09, 2009 00:06:26   
johnjerry Member Since: August 2009   Contribution: 4    

RE: explian rowid,rownum?what are the psoducolumns we have?
My 2 cents:
Rowid contains hexa-decimal number

  • bits 1 to 32 (bytes 1 to 4): data object id (0-4294967295)
  • bits 33 to 44 (byte 5 and half byte 6): file number inside the tablespace (0-4095) - file id
  • bits 45 to 64 (half byte 6 and bytes 7 and 8): block number inside the file (0-1048575) - block id
  • bits 65 to 80 (bytes 9 and 10): row number inside the block (0-65535)

When printed each field is displayed in radix 64 (A-Za-z0-9+/): OOOOOOFFFBBBBBBRRR


 
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 - 2010 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape