Disclaimer: Please forgive my wording as im having alot of trouble trying to describe my question.
I have tables A and B
Table A(ID, YEAR) where the key is ID+YEAR:
ID|YEAR
-------
1 |2001
1 |2002
1 |2003
2 |2001
2 |2002
3 |2001
Table B(YEAR) key is YEAR:
YEAR
----
2001
2002
2003
I want to find the ID that appears in all years of table B which is ID 1.
that is, ID that appears in all YEAR rows of table B.
I have tried using some techniques with join and difference but im having trouble figuring this out.
If there is a better way to word this question, please tell me, because I also can't seem to find a way to ask this online. I don't know how to word it in a concise way.
EDIT: I should mention that this is using relational algebra not sql.