1.use database_name
select s.sno,c.credit from course c join elective e
on c.con=e.con join student s
on s.sno=e.sno
where c.con='c06'
2..use database_name
select s.sname,c.sname from course c join elective e
on c.con=e.con join student s
on s.sno=e.sno
where c.con='c06'
3.select s.sname,c.sname from course c join elective e
on c.con=e.con join student s
on s.sno=e.sno
where c.cname='ENGLISH'
4..select s.sno from course c join elective e
on c.con=e.con join student s
on s.sno=e.sno
where c.cno in('c02','c06')
5...select s.sno from course c left join elective e
on c.con=e.con join student s
on s.sno=e.sno
where c.cno in('c02','c06')
6...select s.sno from course c left join elective e
on c.con=e.con join student s
on s.sno=e.sno
where c.cno not in('c02','c06')
7.select sname from student
8.select s.sno from course c left join elective e
on c.con=e.con join student s
on s.sno=e.sno
where s.sno like['s08'%]
呵呵,就这些了
关系代数的符号不好表达呀
两者理解起来都一样的……
很简单的
关注