Ok, thanks, I didn't know about this SQL rule, infact in the app usually 
ordered column in always included in the column-list but sometime in the 
console to speed up typing you can omit it, but now at least I know is a 
mistake!

On Saturday, July 26, 2014 7:15:16 PM UTC+2, Lvc@ wrote:
>
> Hi Carlo
> this isn't a bug, but it's the default behavior with SQL, take a look at: 
> http://www.tutorialspoint.com/sql/sql-sorting-results.htm. Look at bold 
> (mine):
>
> The SQL ORDER BY clause is used to sort the data in ascending or 
> descending order, based on one or more columns. Some database sorts query 
> results in ascending order by default.
> Syntax:The basic syntax of ORDER BY clause which would be used to sort 
> result in ascending or descending order is as follows:
>
> SELECT column-list 
> FROM table_name [WHERE condition] [ORDER BY column1, column2, .. columnN] 
> [ASC | DESC];
>
> You can use more than one column in the ORDER BY clause. *Make sure 
> whatever column you are using to sort, that column should be in 
> column-list.*
>
> Lvc@
>
>
>
> On 25 July 2014 19:23, Carlo Polisini <[email protected] <javascript:>> 
> wrote:
>
>> Performing this query in console:
>>
>> select title,creationDate from files order by creationDate
>>
>> records are correctly ordered.
>>
>> but with this:
>>
>> select title from negotiation order by creationDate desc
>>
>> order is not applied, I get same results if I omit order by.
>>
>> I think should not be mandatory to select the column ordered.
>>
>> -- 
>>
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "OrientDB" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to