This article is in Cat Qi Of Refer to the original post On the basis of the above, it is edited by the author after practicing one by one , Not the original , It's just a touch up . in addition , There is not only one solution to the problems listed in this paper , This paper just gives a common one , I also hope you can play freely .

# One 、 Be a bully at three ：“ Student - Course - achievement ” Class topics

## 1.1 The table structure of this topic

Student(S#,Sname,Sage,Ssex)   Student list
Course(C#,Cname,T#)   The curriculum
SC(S#,C#,score)   League tables
Teacher(T#,Tname)    Teachers list

## 1.2 The table and test data of this topic

（1） Build table ：

 CREATE TABLE Student
(
S# INT,
Sname nvarchar(32),
Sage INT,
Ssex nvarchar(8)
)
CREATE TABLE Course
(
C# INT,
Cname nvarchar(32),
T# INT
)
CREATE TABLE Sc
(
S# INT,
C# INT,
score INT
)
CREATE TABLE Teacher
(
T# INT,
Tname nvarchar(16)
)

Be careful ： The primary key and foreign key are not considered in the table building statement ;

（2） Test data ：

 insert into Student select 1,N' that ',18,N' male ' union all
select 2,N' Qian Er ',19,N' Woman ' union all
select 3,N' Zhang San ',17,N' male ' union all
select 4,N' Li Si ',18,N' Woman ' union all
select 5,N' Wang Wu ',17,N' male ' union all
select 6,N' Zhao Liu ',19,N' Woman '
insert into Teacher select 1,N' Yeping ' union all
select 2,N' He Gao ' union all
select 3,N' Yang Yan ' union all
select 4,N' Zhou Lei '
insert into Course select 1,N' Chinese language and literature ',1 union all
select 2,N' mathematics ',2 union all
select 3,N' English ',3 union all
select 4,N' Physics ',4
insert into SC
select 1,1,56 union all
select 1,2,78 union all
select 1,3,67 union all
select 1,4,58 union all
select 2,1,79 union all
select 2,2,81 union all
select 2,3,92 union all
select 2,4,68 union all
select 3,1,91 union all
select 3,2,47 union all
select 3,3,88 union all
select 3,4,56 union all
select 4,2,88 union all
select 4,3,90 union all
select 4,4,93 union all
select 5,1,46 union all
select 5,3,78 union all
select 5,4,53 union all
select 6,1,35 union all
select 6,2,68 union all
select 6,4,71

## 1.3 Let's fight it, universe

（1） Inquire about “001” Course than “002” Student numbers of all students with high course scores ;

 select a.S# from
(select S#,Score from SC where C#='') a,
(select S#,Score from SC where C#='') b
where a.S#=b.S# and a.Score>b.Score

（2）  Query average score greater than 60 Student number and average score ;

 select S#,AVG(Score) as AvgScore
from SC
group by S#
having AVG(Score)>60

（3） Check the student numbers of all students 、 full name 、 Number of courses selected 、 Total score ;

 select s.S#,s.Sname,COUNT(sc.C#) as CourseCount,SUM(sc.Score) as ScoreSum
from Student s left outer join SC sc
on s.S# = sc.S#
group by s.S#,s.Sname
order by s.S#

（4） Check the last name “ Li ” The number of teachers ;

 select COUNT(distinct Tname) as count
from Teacher
where Tname like ' Li %'

（5） I didn't learn how to query “ Yeping ” The student number of the teacher's classmate 、 full name ;

 select s.S#,s.Sname
from Student s
where s.S# not in
(
select distinct(sc.S#) from SC sc,Course c,Teacher t
where sc.C#=c.C# and c.T#=t.T# and t.Tname=' Yeping '
)

（6） I have learned to query “001” And I learned how to number “002” The student number of the class 、 full name ;

 -- Solution 1 ： Find the intersection
select s.S#,s.Sname
from Student s,SC sc
where s.S#=sc.S# and sc.C#=''
intersect
select s.S#,s.Sname
from Student s,SC sc
where s.S#=sc.S# and sc.C#=''
-- Solution 2 ： Use exists
select s.S#,s.Sname
from Student s,SC sc
where s.S#=sc.S# and sc.C#='' and exists
(
select * from SC sc2 where sc.S#=sc2.S# and sc2.C#=''
)

PS:EXISTS Used to check whether a subquery will return at least one row of data , The subquery does not actually return any data , It's a return value True or False. that , Let's take a look here in and exists The difference between

①in It's the exterior and the interior hash Connect , and exists It's external work loop loop , Every time loop Loop and query the inner table .

② It has always been thought that exists Than in The statement of high efficiency is not accurate .
--> If the two tables in the query are the same size , Then use in and exists Not much difference .
--> If one of the two tables is smaller , One is a big watch , Then the sub query table is very useful exists, Small use of subquery table in.

（7） I have learned to query “ Yeping ” The student number of all the students the teacher taught 、 full name ;

 select s.S#,s.Sname
from Student s
where s.S# in
(
select sc.S#
from SC sc,Course c,Teacher t
where c.C#=sc.C# and c.T#=t.T# and t.Tname=' Yeping '
group by sc.S#
having COUNT(sc.C#)=
(
select COUNT(c1.C#)
from Course c1,Teacher t1
where c1.T#=t1.T# and t1.Tname=' Yeping '
)
) 

① In the test data table , Teacher Ye Ping has only one course

② Modify the test data table , take T#=2 Of TName Also changed to Ye Ping , Ye Ping has two main courses

（8） Check course number “002” The grade is higher than the course number “001” The student number of all the students whose courses are low 、 full name ;

 select s.S#,s.Sname
from Student s,
(select sc1.S#,sc1.Score from SC sc1 where sc1.C#='') a,
(select sc2.S#,sc2.Score from SC sc2 where sc2.C#='') b
where s.S#=a.S# and s.S#=b.S# and a.S#=b.S# and a.Score<b.Score

（9） Check if the course score is less than 60 The student number of each student 、 full name ;

 select s.S#,s.Sname
from Student s
where s.S# in
(
select distinct(sc.S#) from SC sc
where s.S#=sc.S# and sc.Score<60
)

（10） Check the student number of the students who didn't learn all the courses 、 full name ;

 select s.S#,s.Sname
from Student s
where s.S# not in
(
select sc.S# from SC sc
group by sc.S#
having COUNT(distinct sc.C#)=
(
select COUNT(distinct c.C#) from Course c
)
)

（11） Query at least one course and student number is “001” The student number and name of the same student ;

 select distinct(s.S#),s.Sname
from Student s,SC sc
where s.S#=sc.S# and sc.C# in
 (
select distinct(sc2.C#) from SC sc2
where sc2.S#=''
)
order by s.S# asc

（12） Query at least learned the student number as “001” All the students in one class Other students Student number and name ;（ Feeling heel 11 The questions overlap ）

 select distinct(s.S#),s.Sname
from Student s,SC sc
where s.S#=sc.S# and s.S#!='' and sc.C# in
(
select distinct(sc2.C#) from SC sc2
where sc2.S#=''
)
order by s.S# asc

（13） hold “SC” In the table “ Yeping ” The teacher's grade is changed to the average grade of this course ;

 update SC set Score=
(
select AVG(score) from SC sc,Course c,Teacher t
where sc.C#=c.C# and c.T#=t.T# and t.Tname=' Yeping '
)
where C# in
(
select distinct(sc.C#) from SC sc,Course c,Teacher t
where sc.C#=c.C# and c.T#=t.T# and t.Tname=' Yeping '
)

（14） Query and “002” Students of No. 1 study the same course as other students with the same student number and name ;

select s.S#,s.Sname
from Student s
where s.S#!='' and s.S# in
(
select distinct(S#) from SC
where C# in (select C# from SC where S#='')
group by S#
having COUNT(distinct C#)=
(
select COUNT(distinct C#) from SC
where S#=''
)
)

（15） Delete learning “ Yeping ” The teacher's class SC Table record ;

delete from SC where C# in
(
select c.C# from Course c,Teacher t
where c.T#=t.T# and t.Tname=' Yeping '
)

（16） towards SC Insert some records in the table , These records are required to meet the following conditions ：① No number “002” Student number of the course ;② Insert “002” The average of course No ;

 insert into SC
select s.S#,'',(select AVG(score) from SC where C#='')
from Student s
where s.S# not in (select distinct(S#) from SC where C#='')

（17） Show the average score of all students from low to high “ Chinese language and literature ”、“ mathematics ”、“ English ” Three course results , Show as follows ： Student ID, Chinese language and literature , mathematics , English , Number of effective courses , Effective average ;

 select t.S# as ' Student ID',
(select Score from SC where S#=t.S# and C#='') as ' Chinese language and literature ',
(select Score from SC where S#=t.S# and C#='') as ' mathematics ',
(select Score from SC where S#=t.S# and C#='') as ' English ',
COUNT(t.C#) as ' Number of effective courses ',
AVG(t.Score) as ' Effective average '
from SC t
group by t.S#
order by AVG(t.Score)

（18） Search for the highest and lowest scores in all subjects ： Show as follows ： Course ID, The highest , Lowest score ;

 select sc.C# as ' Course ID',MAX(Score) as ' The highest ',MIN(Score) as ' Lowest score '
from SC sc
group by sc.C#

（19） According to the average score of each subject from low to high and the percentage of pass rate from high to low ;

 select sc.C#,c.Cname,ISNULL(AVG(sc.Score),0) as 'AvgScore',
100 * SUM(CASE WHEN ISNULL(sc.Score,0)>=60 THEN 1 ELSE 0 END)/COUNT(*) as 'Percent(%)'
from SC sc,Course c
where sc.C#=c.C#
group by sc.C#,c.Cname
order by [Percent(%)] desc

PS: The difficulty of this problem is how to find the percentage of passing rate , We can judge each line by Score Greater than or equal to 60 Divide the number of students who scored by the number of students in the course to get the pass rate , And then multiply it by 100 You get the percentage . The aggregate function is used here SUM(PassedCounts)/COUNT(AllCounts) Get a pass rate （ Less than 1 Probability ）, Finally multiply by 100 Get the percentage . The core is here PassedCounts（ Number of pass ） The calculation of , It's used here CASE WHEN *** THEN *** ELSE *** END The sentence of , Be flexible to Score It's judged and assigned （1 and 0） Calculate .

in addition , here [Percent(%)] have access to 100 * SUM(CASE WHEN ISNULL(sc.Score,0)>=60 THEN 1 ELSE 0 END)/COUNT(*) replace .

（20） Find out the percentage of the average grade and pass rate of the following courses ( remarks ： Need to be in 1 In line display ):  The enterprise management （002）,OO&UML （003）, database （004）

 select
SUM(CASE WHEN C#='' THEN Score ELSE 0 END)/SUM(CASE C# WHEN '' THEN 1 ELSE 0 END) as ' Average score of enterprise management ',
100 * SUM(CASE WHEN C#='' and Score>=60 THEN 1 ELSE 0 END)/SUM(CASE C# WHEN '' THEN 1 ELSE 0 END) as ' Business management pass percentage ',
SUM(CASE WHEN C#='' THEN Score ELSE 0 END)/SUM(CASE C# WHEN '' THEN 1 ELSE 0 END) as 'OO&UML average ',
100 * SUM(CASE WHEN C#='' and Score>=60 THEN 1 ELSE 0 END)/SUM(CASE C# WHEN '' THEN 1 ELSE 0 END) as 'OO&UML Percent passing ',
SUM(CASE WHEN C#='' THEN Score ELSE 0 END)/SUM(CASE C# WHEN '' THEN 1 ELSE 0 END) as ' Database average ',
100 * SUM(CASE WHEN C#='' and Score>=60 THEN 1 ELSE 0 END)/SUM(CASE C# WHEN '' THEN 1 ELSE 0 END) as ' Database pass percentage '
from SC

PS： There are two formats here CASE WHEN sentence , But in fact, these two ways , Can achieve the same function . Simple case function （ For example, above ：CASE C# WHEN '002' THEN 1 ELSE 0 END） The way of writing is relatively simple , But and case The search function （ For example, above ：CASE WHEN C#='002' THEN Score ELSE 0 END） comparison , There will be some functional limitations , For example, write a decision form .

（21） Query the average score of different courses taught by different teachers from high to low ;

 select c.C#,MAX(c.Cname) as 'Cname',MAX(t.T#) as 'T#',MAX(t.Tname) as 'Tname',
AVG(sc.Score) as 'AvgScroe'
from SC sc,Course c,Teacher t
where sc.C#=c.C# and c.T#=t.T#
group by c.C#
order by AvgScroe desc

PS： There may be a lot of questions from the garden club MAX( Name ) Have doubts , Here, let's take a look at Group By sentence . One thing to note here is , stay select The specified field must either be included in Group By After statement , As a basis for grouping ; Or you have to Contained in aggregate functions . therefore , In the above question, we need to inquire about the course name , Teacher's name and other information , But it's not the basis of grouping （ Grouping should be based on the course number ）, So use MAX() This aggregate function is wrapped up in .

（22） Check the following course results 3 Name to number 6 Famous student report card ： The enterprise management （001）, Marx （002）,UML （003）, database （004）

[ Student ID],[ The student's name ], The enterprise management , Marx ,UML, database , Average score

I didn't understand the question , skip .

（23） Statistics and printing of all subjects , Number of people in each score segment : Course ID, Course name ,[100-85],[85-70],[70-60],[ <60]

 select sc.C#,MAX(c.Cname) as 'CourseName',
SUM(CASE WHEN sc.Score BETWEEN 85 and 100 THEN 1 ELSE 0 END) as '[85-100]',
SUM(CASE WHEN sc.Score BETWEEN 70 and 85 THEN 1 ELSE 0 END) as '[70-85]',
SUM(CASE WHEN sc.Score BETWEEN 60 and 70 THEN 1 ELSE 0 END) as '[60-70]',
SUM(CASE WHEN sc.Score BETWEEN 0 and 60 THEN 1 ELSE 0 END) as '[<60]'
from SC sc,Course c
where sc.C#=c.C#
group by sc.C#

（24） Check the student's average score and ranking ;

 select s.S#,s.Sname,T2.AvgScore,
(select COUNT(AvgScore) from
(select S#,AVG(Score) as 'AvgScore' from SC group by S#) as T1
where T2.AvgScore<T1.AvgScore)+1 as 'Rank'
from
(select S#,AVG(Score) as 'AvgScore' from SC
group by S#) as T2,
Student s
where s.S#=T2.S#
order by AvgScore desc

PS： The ranking calculation in this topic is a difficulty , Change the way of thinking , How to calculate the average score of current students can be calculated by calculating how many scores are less than the current students' scores plus 1 You can get , In the above topic ：

(select COUNT(AvgScore) from
(select S#,AVG(Score) as 'AvgScore' from SC group by S#) as T1
where T2.AvgScore<T1.AvgScore)+1 as 'Rank'

（25） Check the records of the top three students in each subject :( Don't think about the result juxtaposition )

 select sc.C#,c.Cname,sc.S#,s.Sname,sc.Score
from Student s,SC sc,Course c
where sc.C#=c.C# and sc.S#=s.S# and sc.Score in
(
select top 3 Score from SC sc2
where sc.C#=sc2.C#
Order by Score desc
)
order by sc.C#,sc.Score desc

（26） Check the number of students selected for each course ;

 select sc.C#,MAX(c.Cname) as 'CName',COUNT(distinct sc.S#) as 'StudentCount'
from SC sc,Course c
where sc.C#=c.C#
group by sc.C#

（27） Find out the student number and name of all the students who only take one course ;

 select s.S#,s.Sname
from Student s
where s.S# in
(
select sc.S# from SC sc
group by sc.S#
having COUNT(distinct sc.C#)=1
)

here SC None of the students in the table chose only one course , You can change the statement to ：having COUNT(distinct sc.C#)=2, The results are as follows ：

（28） Check the boys 、 Number of girls ;

 select COUNT(S#) as 'BoysCount' from Student s where s.Ssex=' male '
select COUNT(S#) as 'GirlsCount' from Student s where s.Ssex=' Woman '

（29） Check the last name “ Zhang ” List of students ;

 select s.S#,s.Sname
from Student s
where s.Sname like ' Zhang %'

（30） Check the list of students with the same surname , And count the number of people with the same name ;

 select s.Sname,COUNT(Sname) as 'SameCount'
from Student s
group by s.Sname
having COUNT(Sname)>1

here Student There are no two students with the same name in the table , So we insert a ：{7, Qian Er ,20, Woman }, Then execute the above SQL Statement can get the following result ：

（31） Inquire about 1981 List of students born in ( notes ：Student In the table Sage The type of column is datetime) ;

This topic is very strange , When designing a database Sage yes int type , Here again datetime type , I'm sick . Therefore, only the reference answers are given , I can't do it. Look at the results .

 select Sname,CONVERT(char (11),DATEPART(year,Sage)) as Age
from Student
where CONVERT(char(11),DATEPART(year,Sage))='';

（32） Query the average score of each course , The results are in ascending order of average score , The average is the same , In descending order of course number ;

 select sc.C#,AVG(sc.Score) as 'AvgScore'
from SC sc
group by sc.C#
order by AvgScore asc,C# desc

（33） Query average score greater than 85 Of all students 、 Name and average score ;

 select sc.S#,s.Sname,AVG(sc.Score) as 'AvgScore'
from Student s,SC sc
where s.S#=sc.S#
group by sc.S#,s.Sname
having AVG(sc.Score)>85

（34） Query the course name as “ mathematics ”, And the score is lower than 60 Students' names and scores ;

 select s.Sname,sc.Score from Student s,SC sc,Course c
where s.S#=sc.S# and sc.C#=c.C# and c.Cname=' mathematics ' and sc.Score<60

（35） Check the course selection of all students ;

 select s.S#,s.Sname,c.C#,c.Cname from Student s,SC sc,Course c
where s.S#=sc.S# and c.C#=sc.C#
order by c.C#,s.S#

（36） Check the results of any course in 70 Score the above names 、 Course name and score ;

 select distinct s.S#,s.Sname,c.Cname,sc.Score
from Student s,SC sc,Course c
where s.S#=sc.S# and sc.C#=c.C# and sc.Score>=70

（37） Check for failed courses , And according to the course number from big to small ;

 select distinct sc.C#,c.Cname from SC sc,Course c
where sc.C#=c.C# and sc.Score<60
order by sc.C# desc

（38） The course number is 003 And the course results are in 80 Student number and name of the above students ;

 select sc.S#,s.Sname from Student s,SC sc
where s.S#=sc.S# and sc.C#='' and sc.Score>=80

（39） Ask for the number of students who have chosen the course （ A super simple question ）

 select COUNT(distinct S#) as 'StuCount' from SC

（40） Check options “ Yang Yan ” Among the students who are taught by the teacher , The name of the student with the highest score and his score ;

 select s.S#,s.Sname,sc.Score
from Student s,SC sc,Course c,Teacher t
where s.S#=sc.S# and sc.C#=c.C# and c.T#=t.T# and t.Tname=' Yang Yan '
and sc.Score =
(
select MAX(sc2.Score) from SC sc2
where sc.C#=sc2.C#
)

（41） Check each course and the number of electives ;

 select sc.C#,c.Cname,COUNT(distinct S#) as 'StuCount' from SC sc,Course c
where sc.C#=c.C#
group by sc.C#,c.Cname

（42） Check the student number of students with the same score in different courses 、 Course no. 、 Student achievement ;

 select distinct sc1.S#,sc1.C#,sc1.Score from SC sc1,SC sc2
where sc1.C#!=sc2.C# and sc1.Score=sc2.Score
order by sc1.Score asc

（43） Check the top two students in each course ;

 select sc.C#,c.Cname,sc.S#,s.Sname,sc.Score from Student s,SC sc,Course c
where s.S#=sc.S# and sc.C#=c.C# and sc.Score in
(
select top 2 sc2.Score from SC sc2
where sc2.C#=sc.C#
order by sc2.Score desc
)
order by sc.C#

（44） Count the number of students in each course （ exceed 10 People's course statistics ）. Require output of course number and number of electives , The query results are arranged in descending order of the number of people , The query results are arranged in descending order of the number of people , If the number of people is the same , In ascending order of course number

 select sc.C#,COUNT(distinct S#) as 'StuCount' from SC sc
group by sc.C#
having COUNT(distinct S#)>=10
order by StuCount desc,sc.C# asc

because SC There is no more than 10 The human curriculum , Therefore, the query result is empty .

（45） Search student ID of at least two courses ;

 select distinct sc.S# from SC sc
group by sc.S#
having COUNT(sc.C#)>=2

SC All the data in the table have taken more than two courses , So the result is all the student numbers ;

（46） Check the course number and course name of the courses that all students take ;

 select sc.C#,c.Cname from SC sc,Course c
where sc.C#=c.C#
group by sc.C#,c.Cname
having COUNT(sc.S#)=(select COUNT(distinct s.S#) from Student s)

SC Insert a piece of data into the table {7,2,80}, Do the above again SQL Statement can get the following result ：

（47） I didn't learn how to query “ Yeping ” The name of the student in any course taught by the teacher ;

 select s.Sname from Student s where s.S# not in
(
select sc.S# from SC sc,Course c,Teacher t
where sc.C#=c.C# and c.T#=t.T# and t.Tname=' Yang Yan '
)

（48） Check the student number and average score of students who have failed two or more courses ;

 select sc.S#,AVG(ISNULL(sc.Score,0)) as 'AvgScore' from SC sc
where sc.S# in
(
select sc2.S# from SC sc2
where sc2.Score<60
group by sc2.S#
having COUNT(sc2.C#)>2
)
group by sc.S#

because SC There are more than two losers in the table , So the query result is empty ;

（49） retrieval “004” The course score is less than 60, Student numbers in descending order of scores ;（ A very simple question ）

 select sc.S# from SC sc
where sc.C#='' and sc.Score<60
order by sc.Score desc

Query results ：S# by 1,3,5

（50） Delete “002” Classmate “001” The results of the course ;（ A very simple question ）

delete from SC where S#='' and C#=''

# Two 、 Practice summary

This article is from Cat Qi Original text 《SQL Interview questions （ Student list - Teachers list - The curriculum - Course selection table ）》 Excerpt from , The first half is more difficult , The second half is less difficult , After my exercises one by one , Also got a lot of exercise . Next Part 2, Two other types of topics will be addressed , I'll call it... For the time being “ Book to time side hate less ： The book - readers - Borrow ” Class topics , This kind of topic is also very common , There will probably be 15 About two topics .

# Refer to the original post

（1）Cat Qi,《SQL Interview questions （ Student list - Teachers list - The curriculum - Course selection table ）》：http://www.cnblogs.com/qixuejia/p/3637735.html

（2）CSDN,《 Find something nice SQL Interview questions 》 Discussion post ,http://bbs.csdn.net/topics/280002741

author ： Zhou Xu Long

The copyright of this article belongs to the author and blog Park , Welcome to reprint , However, this statement must be retained without the consent of the author , And give the original link in the obvious position of the article page .

## Go to the database foundation of interview ： One 、 You must know that you will SQL Sentence practice -Part 1 More articles about

1. Go to the database foundation of interview ： Two 、SQL Advanced case、 Subquery 、 Pagination 、join And view

One .CASE In two ways 1.1  Equivalent judgment -> amount to switch case (1) Specific usage template : CASE expression WHEN value1 THEN returnvalue1 WHE ...

2. Go to the database foundation of interview ： 3、 ... and 、SQL Advanced variables 、 Business 、 Stored procedures and triggers

One . That little thing about variables 1.1 local variable (1) Declare local variables DECLARE @ Variable name data type ) DECLARE @id int (2) Assign values to variables SET @ Variable name = value --set For ordinary assignments SE ...

3. You must know that you will SQL Interview questions

Let me write it out front This article refers to the original blog < Go to the database foundation of interview : One . You must know that you will SQL Sentence practice -Part 1> and < Go to the database foundation of interview : One . You must know that you will SQL Sentence practice -Part 2> Practising ...

4. 【SQL You must know and you must take notes (1)】 Database foundation 、SQL、MySQL8.0.16 Next database 、 Table creation and data insertion

List of articles 1. Database foundation 1.1 database (database) 1.2 surface (table) 1.3 Columns and data types 1.4 That's ok 1.5 Primary key 2. What is? SQL 3. Create the database for the following exercises . surface (MySQL8. ...

5. .NET Zero Basics 09：SQL Will know

One : Preface It's as if it's time to go a step further , Every programmer will encounter the problem of data storage sooner or later . What do we use to store the data generated by the program ? for instance , What can we use to store the results of our mouse game every time ? Select the following : 1: In the memory . shortcoming , Quit the game , ...

6. The first 4 section ：Java Basics - Will know （ in ）

The first 4 section :Java Basics - Will know ( in ) This section is Java The second section of the basic chapter , Mainly about the difference between abstract class and interface , Annotation and reflection . One . What's the difference between abstract classes and interfaces The main differences between abstract classes and interfaces can be summarized as follows : abstract ...

7. The first 3 section ：Java Basics - Will know （ On ）

The first 3 section :Java Basics - Will know ( On ) This is the first section of the basic section , We start with the most basic java Knowledge points begin to learn . The knowledge points involved in this section include three characteristics of object-oriented : encapsulation , Inheritance and polymorphism , And the important concepts which are common and easy to confuse are covered and emphasized ...

8. 【MySQL Basics 】MySQL Will know

MySQL Will know brief introduction <MySQL Will know > My study notes and summary . Book links understand SQL Database foundation What is a database database (database): Container for storing organized data ( It's usually a text A piece or a piece ...

9. 《MySQL Will know 》 Official database and tables

Data is used to match <MySQL Will know >(MySQL Crash Course) This book uses , Matching SQL Documents can also be found in Ben Forta Web site to download . Ben Forta website :http://forta.c ...

## Random recommendation

1. MySQL5.5 The green version 1067

mysql Green installation version of , Configure according to many articles , There will be The configuration file added [client] default-character-set=utf8 [mysqld] default-character- ...

2. JQuery Realize the function encapsulation of select all and select inversely in the list

When we make a list, we often encounter all choices , Reverse selection for batch processing , for example : I just realized it , And then I want to encapsulate it into the public js in , The packaging is too bad , Sorry to post it ( It's about putting the implementation code in the public domain js in , And then each page uses a fixed ...

3. hdu 3487 Play with Chain

Topic link :http://acm.hdu.edu.cn/showproblem.php?pid=3487 YaoYao is fond of playing his chains. He has a c ...

4. “Microsoft Visual Studio Have a problem , Need to be closed ” terms of settlement

function VS2008, Open the project , The error screen pops up . terms of settlement : Close and save all design forms in the project , Open it again OK~

5. app Call... Every time you update the version js The code prompts the user to download the update

var url = ' network address '; //APP upgrade var wait; function update(){ // Judge the operating system var system = 'android'; if(mui.os.io ...

6. The ninth assignment ——K-means Algorithm application ： Picture compression

One . Read a sample image or self prepared image , Observe the characteristics of image storage data . According to the resolution of the picture , The resolution can be reduced appropriately . Reuse k Mean clustering algorithm , Cluster all the color values in the picture . Then the color of the cluster center is used to replace the original color value . Form a new picture ...

7. YSLOW（ A practical website performance testing tool ）

summary YSlow yes Yahoo One is based on FireFox Plug in for , This plug-in can analyze the pages of a website , And tell you to improve the performance of the website , How to optimize based on some rules .   install   Official website :http://yslow.org/ ...

8. Android 1.6 PackageManagerService Source code analysis

File list framework\base\services\core\java\com\android\server\pm\PackageManagerService.java PackageManag ...

9. Codeforces Round #296 (Div. 1) B. Clique Problem greedy

B. Clique Problem time limit per test 2 seconds memory limit per test 256 megabytes input standard i ...

10. About RDS for mysql Import the database from set global event_scheduler =1 Need more super permissions

About RDS Import the database from set global event_scheduler =1 Need more super permissions Wrong presentation Actually, it means Give Way mysql Auto start Planning tasks If in At the command line Inquire about   SHOW VAR ...