No DIVIDE Operator

Поиск
Список
Период
Сортировка
От Joerg Fischer
Тема No DIVIDE Operator
Дата
Msg-id 372DA3DC.8EEAF089@zkm.de
обсуждение исходный текст
Список pgsql-sql
Hi!

Consider the following szenario:

Two Tables:

create table Person (   name text,   prename text,   street text,   town text
);

create table Officer (   name text,   prename text,   bureau text
);

So, every Officer is a Person. Now, I would like to get all persons
except for Officers.

If there would be a divide operator, I could write

select name, prename from Person divide select name, prename from
Officer;

without it, however, things get really complicated:

select name, prename from Person where prename not in ( select prename
from Officer where Officer.name = Person.name );

This is an easy example. However, I have to deal with about 10 tables in
a corresponding way.

Any better idea? Will there be a divide operator in PGSQL soon?

Thanks!

Regards

Joerg Fischer


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

Предыдущее
От: "Frank Morton"
Дата:
Сообщение: Slow Inserts Again
Следующее
От: Vadim Mikheev
Дата:
Сообщение: Re: [SQL] Slow Inserts Again