KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I'm not 100% if tuples is the term for what I'm talking about but I'm looking at something like this: Table grades user grade ------------ Jim B Bill C Tim A Jim B+ I know I can do: SELECT COUNT(*) FROM grades WHERE ( (user = 'Jim' AND grade = 'B') OR (user = 'Tim' AND grade = 'C') ); But is there a way to do something more like this? SELECT COUNT(*) FROM grades WHERE (user, grade) IN (('Jim','B'), ('Tim','C')); EDIT: As a side note, I'd only tested with: (user, grade) = ('Tim','C') And that fails, so I assumed IN would fail as well, but I was wrong (thankfully!).
Tags (comma-separated)
Save Edits
Cancel