Vikas:

If you want to FORCE the order you can do couple of things like having a big
PCTFREE (to make sure that no rows are migrated because of the updates) and
small PCTUSED so that the blocks are never reused.

In this case records will be stored in (close to) ordered manner and SELECTs
will return the rows in the way it is inserted.
( THis is not a fool proof method since parallel DMLs will not work as
expected!!)

Best Regards,
K Gopalakrishnan
Bangalore, INDIA


----- Original Message -----
To: "Multiple recipients of list ORACLE-L" <[EMAIL PROTECTED]>
Sent: Wednesday, May 15, 2002 1:18 PM


> Ther is no concept first row/ last row in any RDBMS. The concept of ROWID
> fails as the rows are deleted and hence inserted again. The previous
ROWID's
> are reallocated again. The only way you can get the rows sorted out in the
> way they have been entered is by creating a column in the table specifying
> the created_Date as sysdate().
>
> This would continuously prop up the table data wrt this column. And then
you
> could do order by on this column to get the desired result.
>
> Regards,
> Vikas Khanna
>
>
> -----Original Message-----
> [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, May 15, 2002 11:38 AM
> To: Multiple recipients of list ORACLE-L
>
>
> Hi All
>
> Is there any method in Oracle to capture or order the rows in a table in
> the order they were entered.
> I tried it with rowid but when a row is deleted, the rowid corresponding
to
> this row is reassigned for a new row
> which is inserted into the table at a later stage.
>
> Eg.
>
> SQL> select rowid,abc.* from abc order by rowid;
>
> ROWID                       A
> ------------------ ----------
> AAAFmYAASAAAYsqAAA        100
> AAAFmYAASAAAYsqAAB        200
> AAAFmYAASAAAYsqAAC        300
>
> I deleted one transaction.
>
> delete from abc where a=200;
> commit;
>
> Then I inserted two rows.
>
> insert into abc values(500);
> insert into abc values(600);
> commit;
>
> Now when I order by rowid
>
> SQL>  select rowid,abc.* from abc order by rowid;
>
> ROWID                       A
> ------------------ ----------
> AAAFmYAASAAAYsqAAA        100
> AAAFmYAASAAAYsqAAB        600
> AAAFmYAASAAAYsqAAC        300
> AAAFmYAASAAAYsqAAD        500
>
> I.e The values I entered last appeared second.The rowid
(AAAFmYAASAAAYsqAAB
> ) corresponding to the row I deleted was reassigned for the last entered
> row (a=600).
> What I want is that this must be sorted in the order of its entry.
> Can anyone help me out.
> Thanks in advance
> Systems.
>
>
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --
> Author:
>   INET: [EMAIL PROTECTED]
>
> Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
> San Diego, California        -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from).  You may
> also send the HELP command for other information (like subscribing).
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --
> Author: Vikas Khanna
>   INET: [EMAIL PROTECTED]
>
> Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
> San Diego, California        -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from).  You may
> also send the HELP command for other information (like subscribing).

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: mail.yahoo.com
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Reply via email to