At 12:00 PM -0500 6/14/02, Jay Blanchard wrote:
>[snip]
>When I say 'select * from table', can I always be assured of the
>order in which the results are retrieved. If I issue the query a second
>time, (assuming no new insertions on the table), will I get the results in
>the same order, again?
>[/snip]
>
>Yes. Data is always sorted from first entered to last entered unless you
>change the sort with an ORDER BY or GROUP BY.


...unless you do any deletes and subsequent inserts, or you optimize 
the table, or MySQL decides to change internal record ordering, or...

As a general rule in relational databases, results should always be 
considered an unordered set unless you EXPLICITLY specify an ORDER BY.

        - steve


>HAGW!
>
>Jay
>sql, mysql, query
>


-- 
+------------------------------------------------------------------------+
| Steve Edberg                                      [EMAIL PROTECTED] |
| University of California, Davis                          (530)754-9127 |
| Programming/Database/SysAdmin               http://pgfsun.ucdavis.edu/ |
+------------------------------------------------------------------------+
| "If only life would imitate toys."                                     |
|                  - Ted Raimi, March 2002                               |
|                  - http://www.whoosh.org/issue67/friends67a.html#raimi |
+------------------------------------------------------------------------+

---------------------------------------------------------------------
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