On Fri, 14 Jun 2002, Francisco Reinaldo wrote:

> Date: Fri, 14 Jun 2002 12:52:15 -0700 (PDT)
> From: Francisco Reinaldo <[EMAIL PROTECTED]>
> To: Steve Edberg <[EMAIL PROTECTED]>, Vandana <[EMAIL PROTECTED]>
> Cc: Jay Blanchard <[EMAIL PROTECTED]>,
>     [EMAIL PROTECTED]
> Subject: RE: Is the order same?
> 
> Hi,
> 
> I would not rely on the "insertion order" if I were
> you. Honestly, I don't know how MySQL deals with it
> but servers such as Microsoft SQL Server or even
> Access won't provide a deterministic order unless you
> sort using sort by.
> 
SQL standard doesn't provide deterministic order. In fixed record size
ISAM tables slots are reused (would expect that).  Every book I've read 
says that order is "random" unless you sort.

> I recomend you to use sort by anyways if you need the
> result sets sorted, you never know if you want to
> migrate to another platform. To make things a little
> bit faster, you can create some sorted indices.
> 
> Good Luck!
> --- Steve Edberg <[EMAIL PROTECTED]> wrote:
> > 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
> > 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! - Official partner of 2002 FIFA World Cup
> http://fifaworldcup.yahoo.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
> 

Sincerely,

William Mussatto, Senior Systems Engineer
CyberStrategies, Inc
ph. 909-920-9154 ext. 27


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