Hello all, I hope some of you SQL wizards can help me figure this out:
The statement below works perfectly. I get all student names in the class with a class id of "A" SELECT person.name FROM person, class, link WHERE link.pid=person.id AND link.cid=class.id AND class.id="A" What I can't figure out is how to get the names of students who are in TWO or more classes, "A" and "B", for example. In English: "Select all students who are in class A as well as class B". Or any combination of multiple classes: A&C, A,B&C, etc. Can that be accomplished in one select statement? I haven't been able to do that. db setup: Table: person Columns: id, Name Table: class Columns: id, Name Table: link Columns: pid, cid Thanks for any guidance. I'm really stumped. -- Sean McCollum Mac OS 10.4.7 RB 2006 r3 Pro _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives of this list here: <http://support.realsoftware.com/listarchives/lists.html>
