ambiguous

Поиск
Список
Период
Сортировка
От si
Тема ambiguous
Дата
Msg-id 20010307153319.324DA274D@sitemail.everyone.net
обсуждение исходный текст
Ответы RE: ambiguous  ("Tamsin" <tg_mail@bryncadfan.co.uk>)
Список pgsql-novice
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-novice по дате отправления:

Предыдущее
От: Allen.Kimberly@epamail.epa.gov
Дата:
Сообщение: Unrecognized variable client_encoding
Следующее
От: "Dax Duskin"
Дата:
Сообщение: ...