ambiguous - Mailing list pgsql-general

From si
Subject ambiguous
Date
Msg-id 20010307153832.D1D6F274E@sitemail.everyone.net
Whole thread Raw
Responses Re: ambiguous  ("Brett W. McCoy" <bmccoy@chapelperilous.net>)
Re: ambiguous  (Richard Poole <richard.poole@vi.net>)
List pgsql-general
If I assign the same name to 2 columns in 2 different tables:

+--------------------------------------+
|              DEPARTMENT              |
+----------+----------------+----------+
| LOCATION |  DESCRIPTION   |  DEPT_NO |
+----------+----------------+----------+
| Bedrock  | Administration |     1    |
+----------+----------------+----------+

+--------------------------------+
|            EMPLOYEE            |
+---------+------------+---------+
| EMPL_ID | NAME_LAST  | DEPT_NO |
+---------+------------+---------+
|    1    | Slate      |     1   |
+---------+------------+---------+

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?


_____________________________________________________________
Pick up your email anywhere in the world ---> http://www.remail.net

pgsql-general by date:

Previous
From: Boulat Khakimov
Date:
Subject: Re: (blowfish in Postgres) Undefined symbol -- YAY!
Next
From: Tom Lane
Date:
Subject: Re: Why are tables sizes so big?