ORDER BY now allow fields renamed using AS

Par: Quinn Wildman

Résumé: A small new feature of InterBase 7.5 that is not documented

The ORDER BY clause of a SELECT statement now allows you to order by a field name which has been renamed using the AS operator. In previous versions, you had to order by the field number instead.

Previous functionality:

SELECT QTY_ORDERED, TOTAL_VALUE,
(TOTAL_VALUE / QTY_ORDERED) AS PRICE
FROM SALES
ORDER BY 3;

New Functionality:

SELECT QTY_ORDERED, TOTAL_VALUE,
(TOTAL_VALUE / QTY_ORDERED) AS PRICE
FROM SALES
ORDER BY PRICE;

Réponse serveur de: ETNASC02