有这么一段sql
select c.attr_value from ecs_goods_attr c where c.goods_id in
(select a.goods_id from ecs_goods a where a.goods_name='s020039');
因为我事先知道c.attr_value包涵一个值是apson,
我想排除掉这个值,取余下的其它的值,该怎么写
select c.attr_value from ecs_goods_attr c where c.goods_id in
(select a.goods_id from ecs_goods a where a.goods_name='s020039');
因为我事先知道c.attr_value包涵一个值是apson,
我想排除掉这个值,取余下的其它的值,该怎么写
from ecs_goods_attr c
where c.goods_id in
(select a.goods_id from ecs_goods a where a.goods_name='s020039')
and c.attr_value != 'apson';
inner join ecs_goods a
on c.goods_id=a.goods_id
where a.goods_name='s020039'
inner join ecs_goods a
on c.goods_id=a.goods_id
where a.goods_name='s020039' and c.attr_value<>'apson'
(select a.goods_id from ecs_goods a where a.goods_name='s020039' and a.attr_value<>'apson');