http://dev.mysql.com/doc /refman/5.0/en/problems-with-alias.html Tente isso, em vez disso: SELECT x + y AS z, t.* FROM t WHERE x = 1 HAVING z = 2;