I have two tables in my database:
test1 which looks like:
ID pubmed_ID
-------------------
1 22
2 22
test2 looks like:
antigen pubmed_ID
------------------
Hello 22
Bye 22
when i use the following select statment:
select *
from test1, test2
where test1.pubmed_ID = test2.pubmed_ID;
I get:
ID pubmed_ID antigen pubmed_ID
--------------------------------
1 22 Hello 22
2 22 Hello 22
1 22 Bye 22
2 22 Bye 22
Why have the antigens been duplicated? When they only exist once in the test2 table?
The primary keys are as follows test1 = "ID" column and for test 2 both the "antigen" and "pubmed_ID" form a compund primary key
Am i missing something simple here?