two table comparison: find a mismatch?

Поиск
Список
Период
Сортировка
От Web Manager
Тема two table comparison: find a mismatch?
Дата
Msg-id 3981F322.1CFE9A47@inter-resa.com
обсуждение исходный текст
Ответы Re: two table comparison: find a mismatch?  ("Ross J. Reedstrom" <reedstrm@rice.edu>)
Список pgsql-sql
Hello,

here is to table:                              Table "city"  Attribute    |    Type     |                  Modifier
----------------+-------------+---------------------------------------------city_id        | smallint    | not null
default
nextval('seq_city'::text)region_id      | smallint    |region_tour_id | smallint    |country_id     | smallint
|name_fr       | varchar(40) |name           | varchar(40) |url_id         | smallint    |
 

                            Table "region"Attribute |    Type     |                   Modifier
-----------+-------------+----------------------------------------------region_id | smallint    | not null default
nextval('seq_region'::text)country_id|smallint    |name_fr   | varchar(40) |name      | varchar(40) |address   |
boolean    |url_id    | smallint    | 
 


I whant to fins a "hole" in the linkage... a region number in the city
table is not in the region table any more.

How can I do that?

Where is the city.region_id <> region.region_id

Thanks!
-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Marc Andre Paquin


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

Предыдущее
От: Henry Lafleur
Дата:
Сообщение: RE: RE: Re(2): optimize sql
Следующее
От: "Ross J. Reedstrom"
Дата:
Сообщение: Re: two table comparison: find a mismatch?