combining tables

Поиск
Список
Период
Сортировка
От G. J. Walsh
Тема combining tables
Дата
Msg-id 1224982959.1286.14.camel@www.dscdirectionalservices.com
обсуждение исходный текст
Ответы Re: combining tables  (Cliff Nieuwenhuis <cliff@nieusite.com>)
Список pgsql-novice
I have a situation now where I have a group of 4 tables within one
database. All tables make use of the code defined in the first column as
the primary key.

1 of the 4 tables has the complete range of keys, in this case about
1,000. The other 3 tables have data representing most but not all of
those keys, and in different sets. I want to end up with a new
'combined' table which will allow me to immediately 'see' missing data
from the 3 smaller tables and take the necessary steps to 'fill in the
blanks'. I realize I would of course have to create that table without
constrictions other than the primary key.

My <<< shaky >>> understanding from the manual is that I could use
something like:

SELECT * FROM tmain,tsub1,tsub2,tsub3 NATURAL INNER JOIN tcombo

Am I on the right track?

Thanks for any heads up you'd be kind enough to provide.

George

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

Предыдущее
От: "Oliveiros Cristina"
Дата:
Сообщение: Re: [INSERT]Insert blank values
Следующее
От: Cliff Nieuwenhuis
Дата:
Сообщение: Re: combining tables