commit b7ee05a7f7bb0df44574efb39f899d9afb01cbf1 Author: Yueng <14617246+YuengMeYuuer@user.noreply.gitee.com> Date: Thu Jul 18 20:55:52 2024 +0800 day_01 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5ff6309 --- /dev/null +++ b/.gitignore @@ -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 \ No newline at end of file diff --git a/.idea/$PROJECT_FILE$ b/.idea/$PROJECT_FILE$ new file mode 100644 index 0000000..58b7e3e --- /dev/null +++ b/.idea/$PROJECT_FILE$ @@ -0,0 +1,11 @@ + + + + + + + \ No newline at end of file diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..13566b8 --- /dev/null +++ b/.idea/.gitignore @@ -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 diff --git a/.idea/encodings.xml b/.idea/encodings.xml new file mode 100644 index 0000000..053f396 --- /dev/null +++ b/.idea/encodings.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000..8d66637 --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..f05beda --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,28 @@ + + + + { + "isMigrated": true +} + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/qaplug_profiles.xml b/.idea/qaplug_profiles.xml new file mode 100644 index 0000000..9a7566c --- /dev/null +++ b/.idea/qaplug_profiles.xml @@ -0,0 +1,12 @@ + + + + + \ No newline at end of file diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..51def7c --- /dev/null +++ b/pom.xml @@ -0,0 +1,21 @@ + + + 4.0.0 + + com.bwie + day_1 + 1.0-SNAPSHOT + pom + + sql + + + + 8 + 8 + UTF-8 + + + diff --git a/sql/day_06-07-18.sql b/sql/day_06-07-18.sql new file mode 100644 index 0000000..5e38779 --- /dev/null +++ b/sql/day_06-07-18.sql @@ -0,0 +1,46 @@ +/* + Navicat Premium Data Transfer + + Source Server : 110.41.47.6 + Source Server Type : MySQL + Source Server Version : 50734 + Source Host : 110.41.47.6:3306 + Source Schema : day_06-07-18 + + Target Server Type : MySQL + Target Server Version : 50734 + File Encoding : 65001 + + Date: 18/07/2024 20:49:53 +*/ + +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- ---------------------------- +-- Table structure for stu +-- ---------------------------- +DROP TABLE IF EXISTS `stu`; +CREATE TABLE `stu` ( + `stu_id` int(11) NOT NULL AUTO_INCREMENT, + `stu_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `stu_sex` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `stu_phone` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `stu_age` int(11) NULL DEFAULT NULL, + `stu_classId` int(11) NULL DEFAULT NULL, + `stu_sal` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + PRIMARY KEY (`stu_id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 8 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of stu +-- ---------------------------- +INSERT INTO `stu` VALUES (1, '张三', '男', '18833078187', 122, 20, '1000'); +INSERT INTO `stu` VALUES (2, '李四', '男', '18833078187', 18, 30, '1556'); +INSERT INTO `stu` VALUES (3, '王五', '男', '18833078187', 22, 20, '4567'); +INSERT INTO `stu` VALUES (4, '好留', '男', '18833078187', 21, 30, '5600'); +INSERT INTO `stu` VALUES (5, '呼气', '男', '18833078187', 20, 30, '6800'); +INSERT INTO `stu` VALUES (6, '爱答', '女', '18833078187', 20, 30, '1500'); +INSERT INTO `stu` VALUES (7, '不理', '女', '18833078187', 20, 30, '15000'); + +SET FOREIGN_KEY_CHECKS = 1; diff --git a/sql/text.sql b/sql/text.sql new file mode 100644 index 0000000..72e8dd9 --- /dev/null +++ b/sql/text.sql @@ -0,0 +1,18 @@ +SELECT * FROM `stu` s ORDER BY s.stu_age DESC; + + +SELECT * FROM `stu` s WHERE s.stu_name LIKE '%王%'; + + +SELECT * FROM `stu` s WHERE s.stu_sal>5000 AND s.stu_sex='男'; + + +SELECT *,s.stu_phone FROM `stu` s WHERE s.stu_classId=20 AND s.stu_sex='男'; + + +SELECT *,MIN(s.stu_sal) FROM `stu` s ; + + +SELECT *,MIN(s.stu_age) FROM `stu` s WHERE s.stu_classId=30; + +SELECT *,MIN(s.stu_sal) FROM `stu` s WHERE s.stu_sex='女';