Is there any possibility to access a column using the alias for the
column in the where clause?
Queries like that don't seem to work:
SELECT name || ' bought ' || amount || ' units' AS result FROM sales
where
result='abc';
ERROR: Attribute 'result' not found
That works perfectly well:
SELECT name || ' bought ' || amount || ' units' AS result FROM sales
where
name || ' bought ' || amount || ' units'='abc';
result
--------
(0 rows)
Is there any possibility to do this with PostgreSQL 7.0.3?
Hans
Есть вопросы? Напишите нам!
Соглашаюсь с условиями обработки персональных данных
✖
By continuing to browse this website, you agree to the use of cookies. Go to Privacy Policy.