Re: problem in joins

Поиск
Список
Период
Сортировка
От Ragnar
Тема Re: problem in joins
Дата
Msg-id 1164014992.8950.491.camel@localhost.localdomain
обсуждение исходный текст
Ответ на problem in joins  ("deepak pal" <deepak.05pal@gmail.com>)
Список pgsql-general
On mán, 2006-11-20 at 11:23 +0530, deepak pal wrote:
>   i am facing problem in joining three table...there are two columns
> comman in two table..is it nessary to use both these two column..in
> where caluses.........

as a rule, yes.

create table t1 (a1 int ,b1 int, c1 int);
create table t2 (a2 int ,b2 int, d2 int);

if first 2 columns are common, you would:
  select * from t1 JOIN t2 ON ((a1=a2) and (b1=b2));

not sure what your problem with third table is.

if this does not answer your question, please
provide us with an example of what you mean.

gnari





В списке pgsql-general по дате отправления:

Предыдущее
От: Richard Huxton
Дата:
Сообщение: Re: tracking errors in psql
Следующее
От: Rafal Pietrak
Дата:
Сообщение: functions: stable/volatile