Shum [Ming Yik] wrote:

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

If the sort algorithm would always ends up the constructed sort lines
with the rowid, then it would sort constructed sortlines which are the
same following their order in the table

Bert

>
> Shum
> www.mignyik.com
>
>
>
> ----- Original Message ----- From: "Scott Baker" <[EMAIL PROTECTED]>
> To: <[email protected]>
> Sent: Friday, April 01, 2005 3:13 AM
> Subject: Re: [sqlite] Quoestion on Order By ... ?
>
>
>> Not necessarily. All you're telling it to do is sort on the first
>> column, anything beyond that is just random luck. You could easily
>> sort it on both columns.
>>
>> ORDER BY XIVONO, XICODE;
>>
>> Shum [Ming Yik] wrote:
>>
>>> Hi All,
>>>
>>> I have problem with Order by ...:
>>>
>>> There is a table as follow: mytbl01
>>>
>>> XIVONO XICODE XCNT
>>> X001 001 1
>>> X001 002 2
>>> X001 003 3
>>> X001 004 4
>>>
>>>
>>> 1.) SELECT * from mytbl01 WHERE XIVONO='X001'; it return as expected
>>> ! ... it is fine !
>>> X001 001 1
>>> X001 002 2
>>> X001 003 3
>>> X001 004 4
>>>
>>> 2.) However SELECT * from mytbl01 WHERE XIVONO='X001' ORDER BY
>>> XIVONO; it return as follow:
>>> X001 004 4
>>> X001 003 3
>>> X001 002 2
>>> X001 001 1
>>>
>>>
>>> I expect that the result of the Selectd statement (1) and (2) should
>>> be the same (even in order)
>>> But it does not ????
>>>
>>> Any idea ?
>>>
>>> Shum
>>> www.mingyik.com
>>>
>>>
>>>
>>>
>>
>> -- 
>> Scott Baker
>> Canby Telephone - Network Administrator - RHCE
>> Ph: 503.266.8253 
>
>
>
>

Reply via email to