two table comparison: find a mismatch? - Mailing list pgsql-sql

From Web Manager
Subject two table comparison: find a mismatch?
Date
Msg-id 3981F322.1CFE9A47@inter-resa.com
Whole thread Raw
Responses Re: two table comparison: find a mismatch?  ("Ross J. Reedstrom" <reedstrm@rice.edu>)
List 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 by date:

Previous
From: Henry Lafleur
Date:
Subject: RE: RE: Re(2): optimize sql
Next
From: "Ross J. Reedstrom"
Date:
Subject: Re: two table comparison: find a mismatch?