I have the following case: one question, 5 possible answers to it. database has 5 columns for it where each column obviously can hold every answer in it, but always one-at-a-time and every answer only occurs in one column at-a-time.
for instance i have (simplified with language names for explain purposes):
language1 language2 language3 language4 language5
----------+-----------+---------+-----------+----------
english french german greek polish
how would i go about when i want to search for rows where language is both english and greek?
i'd rather not use
'WHERE english in (language1, language2, language3, language4, language5)
AND greek in (language1, language2, language3, language4, language5)';
as this is only one question in the form and as you see every question can have a lot of answers; i have 65+ questions so the query would become enormous...
i'm searching for a solution like 'where (english, greek) in (language1, language2, language3, language4, language5)'
, although this gives an error for using (english, greek)
.
Is something like this possible and if so, how?
Thanks for any thoughts, hints or tips!