From: Kent Anderson <kenta@ezyield.com>
To: Pgsql-Sql@Postgresql. Org <pgsql-sql@postgresql.org>
Subject: How do you compare contents of two tables using 2 pk
Date: Thu, 24 Feb 2005 12:17:48 -0500
Message-ID: <LPENJIOOLAIJBFKIBDKOEECKMEAD.kenta@ezyield.com> (raw)
I have two tables that should contain the same number or records. Both
tables use the same 2 foreign keys as their primary keys.
I did a count on the number of records in both and found one table has 500
records less than the first table so I need to know which records are not in
the second table.
table 1
t1_fk_wm (FK)
t1_fk_hm (FK)
...
...
...
table 2
t2_fk_wm (FK)
t2_fk_hm (FK)
....
Table 2 doesn't have the same number of records as the first table however
it should.
Any suggestions would be appreciated as I am still very much a beginner at
SQL.
Kent Anderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: kenta@ezyield.com
Subject: Re: How do you compare contents of two tables using 2 pk
In-Reply-To: <LPENJIOOLAIJBFKIBDKOEECKMEAD.kenta@ezyield.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox