Say I have a the following db table:
╔═════════════════╦════════════╗
║ ADVERTISEMENTID ║ CATEGORYID ║
╠═════════════════╬════════════╣
║ 1 ║ A ║
║ 1 ║ C ║
║ 2 ║ A ║
║ 2 ║ B ║
║ 3 ║ A ║
╚═════════════════╩════════════╝
Given a list of categories passed as a parameter, say A, C
I want to find only those advertisements that belong only to those two categories, in the above case only advertisement 1 would match.
Can anyone please help me translate this into SQL?