50 commonly used SQL statements Student (S #, Sname, Sage, Ssex) Student table Course (C #, Cname, T #) curriculum SC (S #, C #, score) exam table Teacher (T #, Tname) Instructor table questions: 1. query the student ID of all the students whose
Student (s #, sname, sage, ssex) Student table
Course (C #, cname, T #) Curriculum
SC (s #, C #, score) Orders table
Teacher (T #, tname) Instructor table
Problem:
1. query the student IDs of all students whose "course scores are
50 common SQL statementsStudent (S #, Sname, Sage, Ssex) Student tableCourse (C #, Cname, T #) CurriculumSC (S #, C #, score) Orders tableTeacher (T #, Tname) Instructor tableProblem:1. query the student ID of all students whose score is higher than
50 common SQL statements
Student (S #, Sname, Sage, Ssex) Student tableCourse (C #, Cname, T #) CurriculumSC (S #, C #, score) Orders tableTeacher (T #, Tname) Instructor table
Problem:1. query the student ID of all students whose score is higher
Student (s #, sname, sage, ssex) Student tableCourse (C #, cname, T #) CurriculumSC (s #, C #, score) Orders tableTeacher (T #, tname) Instructor table
Problem:1. query the student ID of all students whose score is higher than that of the "002"
Student (s#,sname,sage,ssex) Student tableCourse (c#,cname,t#) timetableSC (s#,c#,score) score sheetTeacher (t#,tname) Teacher's TableProblem:1, Query the "001" Course than "002" course scores of all students of the school number;
Copy Code
This text has been reprinted online, and some SQL statements are suitable for use in application systems. Some "reports" have a heavier feeling, mainly to review the former.
This text has been reprinted online, and some SQL statements are suitable
50 commonly used test and interview SQL statements Postedon50 commonly used test and interview SQL statements 2009-12-1715: 05 Student (S #, Sname, Sage, Ssex) student table Course (C #, Cname, T #) Course list SC (S #, C #, score) Instructor table
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.