MySQL Select ID's which occur on different rows with multiple specific values for a column

前端 未结 5 863
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-16 20:21

I\'m trying to select items from an associative table that have satisfy two or more values of the same field, sounds confusing, let me explain.

+------------         


        
5条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-16 21:09

    You could try:

    SELECT * FROM item_category WHERE category_id IN (201, 202, ...)

    (or, as the comments say... you may not.)

提交回复
热议问题