有过类似的题目:select * from 产品id in (select 产品id  from table where 产品参数id =X and 产品参数内容='YY')

解决方案 »

  1.   

    select * from 表 a ,表 b where a.产品id = b.产品id and a.产品参数内容 = 250元 and b.产品参数内容 = 30公斤
      

  2.   

    1. select * from 表 a  where a.产品参数内容 = 250元 or a.产品参数内容 = 30公斤
    2. select * from 表 a  where a.产品参数内容 in ( 250元 ,30公斤,...)
    3. select * from 表 a  where a.产品参数内容 >= 250元 and a.产品参数内容 <= 30公斤...原来是自定义查询
      

  3.   

    select * from yourTable A 
    where
    exists (select * from yourTable   where 产品id =A.产品id and 产品参数内容='250元')
    and 
    exists (select * from yourTable   where 产品id =A.产品id and 产品参数内容='30公斤')
      

  4.   

    ben988211的办法是对的,阿土你那是or关系,我要and关系的.再看看有没有更好的办法,没有就结了
      

  5.   

    select * from 表 a where a.产品参数内容 in (select 产品参数内容   from 表 )