Bryan,

Thursday, February 14, 2002, 4:54:11 PM, you wrote:

BM> Greetings,

BM> How do I get the rows in a table to be in a different
BM> order? I know I can sort a SELECT statement with an
BM> ORDER BY clause, but how do I make this a permanent
BM> adjustment to the table, so that all future SELECTs
BM> will produce ordered data? How does MySQL know what
BM> orders the rows are in (how are they actually stored),
BM> and how can I change that?

You should use indexes. Look at: http://www.mysql.com/doc/M/y/MySQL_indexes.html

BM> Here's what's happening: say I have a table with an ID
BM> field like this:

BM> ID
BM> --
BM> 1
BM> 2
BM> 3
BM> 4
BM> 5

BM> Then I delete a few rows:

BM> ID
BM> --
BM> 1
BM> 2
BM> 5

BM> Now, if I insert new rows, they come out like this:

BM> ID
BM> --
BM> 1
BM> 2
BM> 7
BM> 6
BM> 5

BM> How do I get the table so that the inherent order of
BM> the rows (not just the output of a SELECT query with
BM> an ORDER BY) is numerical?

BM> -b


-- 
For technical support contracts, goto https://order.mysql.com/
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Victoria Reznichenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
       <___/   www.mysql.com




---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to