Label:SQL statement Exercises 50 questions Student (sid,sname,sage,ssex) Student table Course (cid,cname,tid) curriculum SC (Sid,cid,score) Table Teacher (tid,tname) Teachers table Practice content:1. Check the number of all students who have a "1" course with a higher grade than "a 2" course;Select A.sid from (select Sid,score from SC where cid=1) A, (select Sid,score from
Create a student tableCreate a score tableCreate a teacher tableCreate a grade Table--1, Query the sname, Ssex, and class columns of all records in the student table. SELECT S.sname, S.ssex, S.classFrom student S--2, query teachers all units that are not duplicated depart column. SELECT DISTINCT depart from teacher--3, querying all records of the student table. SELECT*From student--4, query all records in the score table with scores from 60 to 80. SELECT* FROM score
Most of the SQL statements in this statement come from "Introduction to Database System" (fourth edition) Wang Shan Shaman Xuan Munsu, is our class with the teaching materials, feel very good, summed up the third chapter of the SQL statement, more practical, I hope to help everyone. Summarized below, can be used to learn the underlying SQL statements.Set up a databaseCREATE DATABASE db_studentCreate a tableCREATE TABLE Student(Sno CHAR (9) PRIMARY KEY,--main codeSname CHAR,--Unique valueSsex CH
Question 1:
Problem description:
S (SNO, sname) Student Relationship. Sno is the student ID, and sname is the name
C (CNO, cname, cteacher) Course relationship. CNO is the course number, cname is the course name, And cteacher is the course teacher
SC (SNO, CNO, scgrade) Course Selection relationship. Scgrade is the score
1. (1) find out the names of all students who have taken the course taught by Mr. Li Ming.
-- Implementation code: method 1
Select *
To manage job business training information, create three tables: S (S #, SN, SD, SA) S #, SN, SD, SA stands for student ID, Student name, organization, student age C (C #, CN) C #, CN stands for course number, course name SC (S #, C #, g) S #, C #, and G respectively represent the student ID, number of the selected course, and score 1. query using standard SQL nested statements
To manage job business training information, create three tables: S (S #,
required for the model card [8,086:1521 ] Support.05, check whether the target core network card driver supports the current model cardThe Modinfo command allows you to see *.ko support for which device model, the driver for the target core (2.6.33-110.el6.x86_64) can be/lib/modules/2.6.33-110.el6.x86_ The catalog of "want to find", as follows:#modinfo/lib/modules/2.6.33-110.el6.x86_64/kernel/drivers/net/igb/igb.ko
Filename:igb.koVersion:2.1.0-k2License:gplDescription:intel (R) Gig
downloaded here, but it is used as an exercise without any foreign key Association:
The compiled SQL statement is as follows:
Student (S #, Sname, Sage, Ssex) Student table
Course (C #, Cname, T #) Curriculum
SC (S #, C #, score) Orders table
Teacher (T #, Tname) Instructor table
1. Select the student ID that passes each course
Select distinct's # 'from SC where's #' not in (select's # 'from
The complete HTTP 1.1 specification is from RFC 2616. You can view it at http://www.rfc-editor.org/on-line. The HTTP 1.1 Status Code is marked as a new feature because many browsers only Support HTTP 1.0. You should only send the status code to clients that support HTTP 1.1. The Supported Protocol version can be checked by calling request. getrequestprotocol. The remaining content of this section details the status code in HTTP 1.1. These status codes are classified into five categories: 100-1
response. setStatus (response. SC _NO_CONTENT) instead of response. setStatus (204), because the latter is hard to understand and can easily cause errors. However, you should note that the server allows slight changes to the message, while the client only pays attention to the numeric value of the status code. Therefore, the server may only return HTTP/1.1 200 instead of HTTP/1.1 200 OK.
100 (Continue/Continue)If the server receives a request with a
The Windows Server platform, which Microsoft publicly demonstrated last week, R2 the interest of IT administrators.
Brad Anderson, vice president of project management at Microsoft server and Systems Center, discusses the new features of the platform, as well as the rapid release plan and how it maintains synchronization, with the Searchwindowsserver website.
What is the adoption of Windows Server 2012 within six months of publication, compared to W
business problems. If complicated SQL statements exist in the application system, the business logic is often exposed to the SQL layer, which is not conducive to maintenance and expansion. Although this can often improve the running efficiency. You can choose the specific situation.The following examples are all common SQL statements. In fact, you need to learn a lot about specific databases. For example, the decode function, rowid, rownum, and connect by of oracle db are not universal, but it
business problems. If complicated SQL statements exist in the application system, the business logic is often exposed to the SQL layer, which is not conducive to maintenance and expansion. Although this can often improve the running efficiency. You can choose the specific situation.The following examples are all common SQL statements. In fact, you need to learn a lot about specific databases. For example, the decode function, rowid, rownum, and connect by of oracle db are not universal, but it
Tags: exists result technology BSP log Apple AAAAA number redAs a Java back-end developer, database knowledge is essential, to the database of the familiarity of the investigation is also on whether the person has a solid basic skills. Especially for junior developers, interviews may not ask the framework for knowledge, but they will never go into database knowledge, and here are some common types of SQL statements that can be helpful both for normal development and for preparing interviews. Bas
Tags: io ar os SP on data BS ADAuthor: GW------------------------Data Query------------------------------(Select Sno, AVG (grade) as Avg_grade from SC Group by Sno) as St2--select Student.sno from Student-outer join SC on (STUDENT.SNO=SC.CNO);--select Student.sno,sname,ssex,sage,sdept,sc.cno,sc.grade from Student-outer join SC on (STUDENT.SNO=SC.SNO);--select Stu
, int value );Set the int Type HTTP header value of the specified name.27. void setStatus (int xc );Set the response status code. The new value overwrites the current value.Member (HTTP status code ):Int SC _CONTINUE = 100 int SC _SWITCHING_PROTOCOLS = 101Int SC _ OK = 200 int SC _NON_AUTHORITATIVE_INFORMATION = 203Int
InstallMySQLThe system prompts: Cannot create windows service for mysql. error: 0.
The reason is that the old mysql service exists in the system. The solution is as follows:
To permanently delete the old mysql service, you must run the following command on the command line with the administrative permission:C: \> SC delete mysql[SC] DeleteService SUCCESS
When installing the service, if a similar situation o
Course table:
CNO cname cpno ccredit---------------------------------------1 ss 5 42 mathematics null 43 Information System 1 44 operating system 6 35 Data Structure 7 46 Data Processing null 27 Pascal 6 4
Student table:
Sno sname ssex sage sdept-----------------------------------------200215121 LI Yong M 20 cs200215122 Liu Chen F 19 CS200215123 Wang Min F 18 Ma200215125 Zhang Li M 19 is
SC table:
Sno CNO grade---------------------200215121 1 92200215
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.