Skip to content
Tako Lee edited this page Feb 16, 2014 · 10 revisions
  • Order by items in one line
  • First item in the same line as ORDER BY keyword

    SELECT * FROM Customers
    ORDER BY Country,CustomerName;
  • First item in new line, indented from 1 to n

    SELECT * FROM Customers
    ORDER BY 
      Country,CustomerName;
  • Stacked order by items
  • First item in the same line as ORDER BY keyword

    • Comma at the end of line

      SELECT * FROM Customers
      ORDER BY Country,
               CustomerName;
    • Comma at the begin of line

      SELECT * FROM Customers
      ORDER BY Country
               ,CustomerName;
  • First item in new line, indented from 1 to n

    SELECT * FROM Customers
    ORDER BY 
      Country,
      CustomerName;
  • First item in new line, indented from 1 to n, comma in the begin of line

    SELECT * FROM Customers
    ORDER BY 
      Country
      ,CustomerName;

Clone this wiki locally