Proper Join and check

Поиск
Список
Период
Сортировка
От Patrick Nelson
Тема Proper Join and check
Дата
Msg-id 4165C48DE9A0D211B6400800095C585F172E67@WASHINGTON
обсуждение исходный текст
Ответы Re: Proper Join and check
Список pgsql-general
If I have a one to many relation set on sym in each table is like... say
this:

CREATE TABLE "tableone" (
 "sym" varchar(5) NOT NULL,
 PRIMARY KEY ("sym") );

and

CREATE TABLE "tablemany" (
 "id"  int4       NOT NULL DEFAULT nextval('res_id_seq'::text),
 "sym" varchar(5) REFERENCES tableone ON UPDATE CASCADE,
 PRIMARY KEY ("id") );

Now these tables hold a lot of data so I want to do this correctly.  How do
I find the records in tableone that don't have any corresponding records in
tablemany?  In my application this shouldn't happen accept during the
initial inserting in tableone which briefly is followed by inserting in
tablemany.

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

Предыдущее
От: Oleg Bartunov
Дата:
Сообщение: Re: multi-column btree index for real values
Следующее
От: Patrick Nelson
Дата:
Сообщение: Re: Proper Join and check