select sno
from sc sc1
where exists(select sno
from sc sc2
where sc1.sno=sc2.sno and sc2.cno='c2' and sc2.cno='c1')
为什么上面的句子出错?而下面的就对了!
select sno
from sc sc1
where exists(select sno
from sc sc2
where sc1.sno=sc2.sno and sc2.cno='c2') and cno='c1'
from sc sc1
where exists(select sno
from sc sc2
where sc1.sno=sc2.sno and sc2.cno='c2' and sc2.cno='c1')
为什么上面的句子出错?而下面的就对了!
select sno
from sc sc1
where exists(select sno
from sc sc2
where sc1.sno=sc2.sno and sc2.cno='c2') and cno='c1'
?
这样能出来结果?
楼主是不是全角、半角的问题啊,在全角下输入的脚本阿?
select * from commodity a
where exists (select com_name from commodity b where a.com_id=b.com_id and b.com_name='100元面膜' and b.com_name='穿山龙')
(0 行受影响)