|
SQL Reference |
SELECT Statement |
ORDER BY
|
ORDER BY ClauseSelect List Item Ordinal Numbers Aggregates, Functions, Expressions
Column NamesSELECT company, contact, phone FROM customers ORDER BY company SELECT company, contact, phone FROM customers ORDER BY company, contact SELECT company, contact, phone FROM customers ORDER BY state
Column AliasSELECT company CO, contact CT, phone PH FROM customers ORDER BY CO SELECT company, contact, phone FROM customers ORDER BY CO, CT
Select List Item Ordinal NumbersSELECT company, contact, state FROM customers ORDER BY 3 SELECT company, contact, state FROM customers ORDER BY 3, 1
Aggregates, Functions, ExpressionsSELECT customer_no, sum(amount) FROM orders GROUP BY customer_no ORDER BY 2 SELECT customer_no, count(distinct order_no) FROM orders GROUP
BY customer_no
ASC, DESCDESC (Descending) sorts will NOT be optimized, meaning they may increase the overall elapsed query time. ASC (Ascending) sorts may be optimized, depending on the index installation. SELECT company, contact, phone FROM customers ORDER BY company asc SELECT customer_no, count(distinct order_no) FROM orders GROUP
BY customer_no
|
|
APIs | SQL Reference | Stored Procedures | Third Party Tools | Debugging |
OmniAccess API |
ODBC |
JDBC |
Nested Queries |
SET Operations |
WITH Options |
CURSOR / INSTANCE |
Commands |
Functions |
SQL Server |
Oracle |
MS Access |
Ms Excel |