The moose likes Oracle/OAS and the fly likes Entries getting placed in random rows Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Oracle/OAS
Bookmark "Entries getting placed in random rows" Watch "Entries getting placed in random rows" New topic

Entries getting placed in random rows

Ransika deSilva
Ranch Hand

Joined: Feb 18, 2003
Posts: 524
I am a new commer to JAVA. I am using oracle as my database. I have this problem of when I
write data in to a table, entries get entered in random positions. I mean for example if there
are already 3 entries in a table and when i enter a new entry the new entry goes to the top
of the table other than appearing in the 4th row. Could you please tell me how to over come this.

SCJP 1.4, SCMAD 1.0<br />SCWCD, SCBCD (in progress)
Mark Spritzler

Joined: Feb 05, 2001
Posts: 17276

As far as I know you cannot overcome this issue. It is how Oracle handles deleted records, and inserts. If it did not work this way, then your table size would increase as if all your deleted records were still there.
Insert order should have no effect in your queries. You just need to remember to have indexes where you need them, and order by in your queries.

Perfect World Programming, LLC - iOS Apps
How to Ask Questions the Smart Way FAQ
I agree. Here's the link:
subject: Entries getting placed in random rows
It's not a secret anymore!