How do you compare contents of two tables using 2 pk

Поиск
Список
Период
Сортировка
От Kent Anderson
Тема How do you compare contents of two tables using 2 pk
Дата
Msg-id LPENJIOOLAIJBFKIBDKOEECKMEAD.kenta@ezyield.com
обсуждение исходный текст
Ответы Re: How do you compare contents of two tables using 2 pk  ("Joel Fradkin" <jfradkin@wazagua.com>)
Список pgsql-sql
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

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

Предыдущее
От: Bricklen Anderson
Дата:
Сообщение: Re: Junk queries with variables?
Следующее
От: Richard Huxton
Дата:
Сообщение: Re: Junk queries with variables?