Open main menu

CDOT Wiki β

Changes

Default orderBy research 2/17/2011

199 bytes added, 14:50, 17 February 2011
no edit summary
I run the same tests in MySQL: I've got the same data as in PostgreSQL. The only difference is the order of rows, so I figured it has something to do with default ordering in PostgreSQL:<br/>
The null value sorts higher than any other value. In other words, with ascending sort order, null values sort at the end, and with descending sort order, null values sort at the beginning.<br/> If not specified, '''<tt>ASC</tt>''' is assumed by '''default'''.<br/>
Whereas in the MySQL:<br/>
When doing an ORDER BY, NULL values are presented first if you do ORDER BY ... ASC (default) and last if you do ORDER BY ... DESC. <br/>
This explains why testUpdates gives the specified message, and I guess we have the same issue when we are trying to read '''without order by''' clause
1
edit