不错,值得学习
不论什么事,只要认准了一个目标,然后朝之不懈地努力,就一定实现。编程爱好者QQ群:21318556
那里需要上面那么麻烦啊?这样不就OK了?
SELECT sno,sname,sage,ssex,saddress,sbirthday,sdept,score,cname,ccredit
FROM student,student_course,course
WHERE student.sno=student_course.sno AND student_course.cno=course.cno
当然创建试图也是一个好办法的。方法如下:
CREATE VIEW v_Studennt
(v_sno,v_sname,v_sage,v_ssex,v_saddress,v_sbirthday,v_sdept,v_score,v_cname,v_ccredit)
AS SELECT sno,sname,sage,ssex,saddress,sbirthday,sdept,score,cname,ccredit
FROM student,student_course,course
WHERE student.sno=student_course.sno AND student_course.cno=course.cno