|
1.8. A HAVING clause cannot refer to columns using the alias in an AS clause.
References to aliased columns (e.g. A+B AS C) in a HAVING phrase will be replaced with the source expressions. For example:
SELECT F1,F2+F3 as F4 FROM TBL GROUP BY F1 HAVING F4>0
will be replaced with
SELECT F1,F2+F3 AS F4 FROM TBL GROUP BY F1 HAVING F2+F3>0
back
to features list
|