List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:June 21 1999 8:10pm
Subject:Re: Internal row order
View as plain text  
At 2:28 PM -0500 6/21/99, frEEk (Jonathan Knopp) wrote:
>First of all, does anyone know how rows within a table are ordered
>internally, and more importantly, does that order changewhen
>modifications are made (ie new rows)?

Internal order is not something you can count on.  Use ORDER BY to put
rows in the order you want them.

Yes, the internal order can change when you modify the table, because
a new row might go in the slot where an old row was deleted.


>Based on the above, is it possible to start searching a table from a
>specific row? When I search for a matching entry in a table, I need to
>do a cyclic search (ie always start where a previous search ended).  If
>the table could be forced to order by index alpha, then I could say
>strcmp(index,somename), but what happens when it hits the end of the
>table, will it cycle around till it hits the starting point and then
>fail (assuming that it found no match)?
>
>Many thanks
>
>PS My appologies if this is a dumb question. I am new to SQL (this would
>be simple in perl) and I could not find an answer in the docs.

You might be best off writing a Perl DBI script to do what you want.
Then you can grab the rows and process them in any order you please.

--
Paul DuBois, paul@stripped
Northern League Chronicles: http://www.snake.net/nl/
Thread
Internal row orderJonathan Knopp)21 Jun
  • Re: Internal row orderGarrick Staples21 Jun
  • Re: Internal row orderPaul DuBois22 Jun