List:General Discussion« Previous MessageNext Message »
From:<sinisa Date:March 13 1999 11:35pm
Subject:order by multiple columns
View as plain text  
Marc Antony Vose writes:
 > Hey there...
 > 
 > Sorry if this is an elementary question, but can I order a result set by
 > more than one column?
 > 
 > Something like "select blah blah blah order by avg,lastname"
 > 
 > Cheers.
 > 
 > Marc
 > 

Hi!

Of course you can. Something like this:

select blah1, blah2, blah3 .. from table order by blah1,blah2

Sinisa

+---------------------------------------------------------------------+
| TcX  ____  __     _____   _____  ___        ==  mysql@stripped        |
|     /*/\*\/\*\   /*/ \*\ /*/ \*\ |*|        Sinisa Milivojevic      |
|    /*/ /*/ /*/   \*\_   |*|   |*||*|        mailto:sinisa@stripped |
|   /*/ /*/ /*/\*\/*/  \*\|*|   |*||*|        Belgrade                |
|  /*/     /*/  /*/\*\_/*/ \*\_/*/ |*|_____   Serbia                  |
|  ^^^^^^^^^^^^/*/^^^^^^^^^^^\*\^^^^^^^^^^^                           |
|             /*/             \*\                   Developers Team   |
+---------------------------------------------------------------------+
Thread
order by multiple columnsMarc Antony Vose13 Mar
  • order by multiple columnssinisa14 Mar