Mysql + Classic asp有替代选择

时间:2013-11-20 16:18:19

标签: mysql asp-classic

我有这样的篮球桌:

          BasketTable
          BasketID         -   ProductID      - Total
              1            |        1         |   1
              2            |        2         |   1
              3            |        3         |   1
              4            |        4         |   2

我使用此查询(Note : ProductID some times 1,2,3 or 1,2)

select * from BasketTable
where ProductID in (1,2,3,4) and Total > 0
Having Count(*) = 4

查询结果:

            BasketTable
            BasketID      -  ProductID  
                1         |      1

我需要这个

           BasketTable
          BasketID         -   ProductID       
              1            |        1          
              2            |        2          
              3            |        3          
              4            |        4          

0 个答案:

没有答案