select sname from s where sid in(
select sid from sc
where cname in(Select cname from sc where sid=(select sid from s where sname=N'我'))
group by sid having count(*)>1
) and sName<>N'我'
select distinct allname = (select SNAME from S where b.SID = s.SID )
from (select * from SC where sid = (select sid from s where sname = '我')) a inner join sc b
on a.cname = b.cname
看错了,囧了吧唧的