0

有一家网店,通过样品ID进入该篮子的商品,并且篮子中的某些商品的数量必须不超过2个,因此一个篮子中可以包含多个商品一个身份证。

 SELECT *
 FROM goods 
 WHERE id IN (101842,101842,101838,101840)

但是,只有在样本单元格 3 中才能生成对样本的全部四个元素的请求吗?

如何在此 sql 查询中获取 4 个元素?

4

1 回答 1

0

If you add an second condition for id you will have the second id. I had the same problem i resolved by this way. Be sure by looking in with mysqlbrowser if you have only one or more.

于 2013-11-04T09:58:36.070 回答