Need a query to return a list of possible values for each field

  Kiến thức lập trình

I have a list of questions and I need a query that will return one row per question and all possible answers for each question listed next to it.

question Answer
Did you enjoy your dinner Yes, no

select question, answer from questionstable
group by question
order by 1;

New contributor

Mindy Hope is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

LEAVE A COMMENT