One select for multiple records by composite key

Viewed 3381

Such a query as in the title would look like this I guess:

select * from table t where (t.k1='apple' and t.k2='pie') or (t.k1='strawberry' and t.k2='shortcake') 
... --10000 more key pairs here

This looks quite verbose to me. Any better alternatives? (Currently using SQLite, might use MYSQL/Oracle.)

4 Answers
Related