select * from sc
;
select s1
.* , s2
.*
from sc s1
, sc s2
where s1
.sid
= s2
.sid
;
select s1
.*,s2
.*
from sc s1
, sc s2
where
s1
.sid
= s2
.sid
and
s1
.cid
='01'
select s1
.* , s2
.*
from sc s1
, sc s2
where
s1
.cid
='01'
and
s2
.cid
='02'
select s1
.* , s2
.*
from sc s1
, sc s2
where
s1
.sid
=s2
.sid
and
s1
.cid
='01'
and
s2
.cid
='02'
select s1
.* , s2
.*
from sc s1
,sc s2
where
s1
.sid
=s2
.sid
and
s1
.cid
='01'
and
s2
.cid
='02'
and
s1
.score
> s2
.score
;
select sname
,s3
.*
from
(select s1
.*
from sc s1
, sc s2
where s1
.sid
=s2
.sid
and
s1
.cid
='01'
and
s2
.cid
='02'
and
s1
.score
>s2
.score
) s3
inner join student
on student
.sid
=s3
.sid
;
转载请注明原文地址: https://mac.8miu.com/read-497740.html