How can I compare rows from 2 tables that have composite primary keys?
Posted
by cdeszaq
on Stack Overflow
See other posts from Stack Overflow
or by cdeszaq
Published on 2010-03-12T20:59:57Z
Indexed on
2010/03/12
21:07 UTC
Read the original article
Hit count: 174
sql
|sql-server
Here's the scenario:
I have 2 tables with data, one is the 2009 version and the other is the 2010 version. The primary key for each of the tables is a composite key. I know there is a different number of rows in each one and I need to find out the differences.
Typically, in the "normal" primary key set-up, I would just look for primary key values NOT IN the list of primary keys from the other table. But I don't know how to do this with a composite primary key (or even if it's possible).
So, how can I compare the rows from these two tables?
© Stack Overflow or respective owner