7.18日考

master
Number7 2024-07-18 20:49:48 +08:00
commit c5d7a263d8
9 changed files with 146 additions and 0 deletions

38
.gitignore vendored 100644
View File

@ -0,0 +1,38 @@
target/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**/target/
!**/src/test/**/target/
### IntelliJ IDEA ###
.idea/modules.xml
.idea/jarRepositories.xml
.idea/compiler.xml
.idea/libraries/
*.iws
*.iml
*.ipr
### Eclipse ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
build/
!**/src/main/**/build/
!**/src/test/**/build/
### VS Code ###
.vscode/
### Mac OS ###
.DS_Store

8
.idea/.gitignore vendored 100644
View File

@ -0,0 +1,8 @@
# Default ignored files
/shelf/
/workspace.xml
# Editor-based HTTP Client requests
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="DiscordProjectSettings">
<option name="show" value="ASK" />
<option name="description" value="" />
</component>
</project>

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding" defaultCharsetForPropertiesFiles="UTF-8">
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" />
<file url="PROJECT" charset="UTF-8" />
</component>
</project>

28
.idea/misc.xml 100644
View File

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="MavenProjectsManager">
<option name="originalFiles">
<list>
<option value="$PROJECT_DIR$/pom.xml" />
</list>
</option>
</component>
<component name="ProjectInspectionProfilesVisibleTreeState">
<entry key="Project Default">
<profile-state>
<expanded-state>
<State />
</expanded-state>
<selected-state>
<State>
<id>Ali-Check</id>
</State>
</selected-state>
</profile-state>
</entry>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

6
.idea/vcs.xml 100644
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

17
pom.xml 100644
View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.example</groupId>
<artifactId>718rk</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
</project>

34
sql 100644
View File

@ -0,0 +1,34 @@
#查询所有学生信息 并根据年级进行降序排序
SELECT * from t_stu order by e_age desc
# 添加至少五条数据
INSERT INTO `rk718`.`t_stu` (`e_id`, `e_name`, `e_sex`, `e_tel`, `class_id`, `e_age`, `e_sal`) VALUES
(0, '王艳1', '女', '123456784', 20, '24', 2350),
(0, '田七', '男', '123456784', 20, '26', 3500),
(0, '赵老刘', '女', '123456784', 23, '30', 4500),
(0, '赵老八', '男', '123456784', 10, '45', 5500),
(0, '李三思', '女', '123456784', 30, '19', 6500)
#查询工资大于5000的所有男同学的信息
SELECT * from t_stu where e_sal>=5000 and e_sex='男'
#查询班级编号为20的男同学的电话号码
SELECT e_tel from t_stu where class_id=20
#查询最低工资
SELECT min(e_sal) from t_stu
#查询班级为30的学生的最小年龄
SELECT min(e_age) from t_stu where class_id=30
#查询女生的最低工资
SELECT min(e_sal) from t_stu where e_sex='女'
#查询女学生中薪资最低的人的全部信息
SELECT * from t_stu where e_sex='女' order by e_sal asc limit 0,1

BIN
理论/img.png 100644

Binary file not shown.

After

Width:  |  Height:  |  Size: 359 KiB