> select * from DEPARTMENT, Employee where dept_no = '1';
>
> PG throws up:
> ERROR: Column 'dept_no' is ambiguous
>
> Is this not allowed? or is my sql understanding wrong?
While a human can determine that it doesn't matter if you use
DEPARTMENT.dept_no or Employee.dept_no in this query, it would
require an extremely talented parser to recognize that.
What you probably want is something like
select * from DEPARTMENT, Employee where DEPARTMENT.dept_no=1
and DEPARTMENT.dept_no=Employee.dept_no;
/andy
---
Andy Riebs, andy.riebs@compaq.com Alpha Technology Solutions Group
978-506-6628, fax 978-506-6524 Compaq Computer Corporation
(h) ariebs@earthlink.net <http://www.linuxalpha.compaq.com>
<http://osdb.sourceforge.net/>