How do I get all combinations of data from a MySQL table?

后端 未结 3 910
长情又很酷
长情又很酷 2021-01-14 07:05

I have spent the last five hours trying to get every product option combination from a table but I\'m totally stuck now. I have a table with data like (simplified):

3条回答
  •  温柔的废话
    2021-01-14 07:33

    select option_id, value_id
    from assigned_options
    group by option_id, value_id
    order by option_id, value_id
    

提交回复
热议问题