logicprobe@bbs.kis.net (Steve Crowe) writes:


>I am taking a CMIS course on databases. I am tring to update and query
>my database by row number. I have a table with 12,410 records in it. I
>need to query the 1st,  the 6,205th, and the 12,410th rows. I tried
>using RowNum in a where clause, but no dice. I also am thinking about
>using RowID, but I am not sure how to go about this.

Thanks for any help,
>Steve Crowe


Using the ROWID would be too complicated for what you wish to do. ROWID 
uses codes for block id's and other "internal" numbering schemes.

Now, you need to determine what order the rows should be returned. That 
is - what is the significance of being the 6,205th row. Is it an 
alphabetical listing, etc? Without specifying an ORDER BY clause, it does 
not make much sense for the 6,205 and last rows...they will be returned 
arbitrarily and may differ from query to query (without an ORDER BY clause)

Try something on the lines of:

SELECT * FROM table_name
ORDER BY ordering_column;

Best of luck!

-Ari Kaplan
Independent Oracle DBA Consultant

<-> Visit my Web Page: www.arikaplan.com                          <->
<->             email: akaplan@interaccess.com                    <->

Back to Ari Kaplan's Home Page ">Back to Ari Kaplan's Home Page