MySQL Query with multiple LIMITS

前端 未结 5 753
甜味超标
甜味超标 2021-01-12 17:49

Let\'s say I have the following table with hundreds of toys of various colors...

---------------------------
  ITEM  |  COST  |  COLOR
----------------------         


        
5条回答
  •  深忆病人
    2021-01-12 18:35

    This is working properly

    (select * from toys where color = 'Yellow' LIMIT 1)
    UNION ALL
    (select * from toys where color = 'White' LIMIT 1)
    

提交回复
热议问题