Actually Sqlite same as other SQL in return order such as sample (1) ( it seems follow the insert order when no specific order by ... )
But Sqlite break the rule (may be it is not a rule), when part of the whole Order by string passing into the select statement ... as sample (2)
Why not both in a same way ?
I meams: 1.) both in (descending order ) or 2.) both in ( ascending order)
Shum www.mingyik.com
----- Original Message ----- From: "Robert Simpson" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Friday, April 01, 2005 4:02 AM
Subject: RE: [sqlite] Quoestion on Order By ... ?
-----Original Message----- From: Shum [Ming Yik] [mailto:[EMAIL PROTECTED] Sent: Thursday, March 31, 2005 12:22 PM To: [email protected] Subject: Re: [sqlite] Quoestion on Order By ... ?
Hi Scott Baker,
In other SQL ... mySQL, PostgreSQL, MSSQL, SQLAnywhere ... Both statement return same as (1)
Actually (1) is the inserted order
If SQLite show as other SQL ... It is much convenience ...!
Someone correct me if I'm wrong, but I believe there is no such thing in SQL
as "implicit order". If you want a column sorted, you must specify it in
the ORDER BY clause.
The fact that the columns "appear" ordered in other databases is something you cannot rely on to always be true. If you don't explicitly set the order, the database is 100% allowed to return you the data any way it chooses, which usually means as fast as possible with the least amount of work.
Robert

