View Single Post
  #2  
Old 02-02-2007, 07:45 AM
domin domin is offline
Senior Member
 
Join Date: Jul 2006
Posts: 167
Thanks: 0
Thanked 1 Time in 1 Post
Rep Power: 18
domin is on a distinguished road
Default

To get output in a particular order, use ORDER BY. It will always take precedence. Without ORDER BY, data is not necessarily returned in any particular order, but DISTINCT is processed similar to GROUP BY, and GROUP BY necessarily has to order the data in order to group it, so it will have an effect on the order in the absence of ORDER BY. -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote
  Webmaster Forums - View Single Post - DISTINCT/SELECT statement?
View Single Post
  #2  
Old 02-02-2007, 07:45 AM
domin domin is offline
Senior Member
 
Join Date: Jul 2006
Posts: 167
Thanks: 0
Thanked 1 Time in 1 Post
Rep Power: 18
domin is on a distinguished road
Default

To get output in a particular order, use ORDER BY. It will always take precedence. Without ORDER BY, data is not necessarily returned in any particular order, but DISTINCT is processed similar to GROUP BY, and GROUP BY necessarily has to order the data in order to group it, so it will have an effect on the order in the absence of ORDER BY. -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote