select * from 表 a ,表 b where a.产品id = b.产品id and a.产品参数内容 = 250元 and b.产品参数内容 = 30公斤
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公斤...原来是自定义查询
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公斤')
2. select * from 表 a where a.产品参数内容 in ( 250元 ,30公斤,...)
3. select * from 表 a where a.产品参数内容 >= 250元 and a.产品参数内容 <= 30公斤...原来是自定义查询
where
exists (select * from yourTable where 产品id =A.产品id and 产品参数内容='250元')
and
exists (select * from yourTable where 产品id =A.产品id and 产品参数内容='30公斤')