SQL Server Sub-query

Source: Internet
Author: User

1 、--Table I: Student table student |--Table II: Teacher Table teacher
--School Number: Code int (primary key) starting from 1 |--teacher number: Code int (primary key) starting from 1001
Name: Name varchar (50) |--Course: Lesson char (10) (Chinese, maths, English)
--Gender: Sex char (10) |--Age: Ages int
--Class: Banji char (10) |--Birthday: birth datetime
--Language Teacher number: Yujiao int
--Math teacher number: Yujiao int
--English teacher number: Yujiao int

--Table III: SCORE Table score
--School Number: Code int (foreign key of student's study number)
--Language score: Yufen decimal (18,2)
--Math Score: Shufen decimal (18,2)
--English score: Yingfen decimal (18,2)

--Student table data: Insert three classes of student data, each class of the same subject teachers are the same, at least 5 people per class

--Teacher table data: Chinese teachers, math teachers, English teachers, respectively, three, each corresponding to a class

--Score Table data: Language, mathematics and English scores corresponding to the study number

SQL Server Sub-query

Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.