SpringBoot操作Oracle

SpringBoot操作Oracle

一、环境:

  Oracle:11.2.0.1

  IP:xxx

  端口:1521

  服务名:orcl

  用户名:ZHANGZHIXI

-----------------------------------------------------

使用的是MybatisPlus来操作数据库。

代码已经放在了Gitee上面:https://gitee.com/zhang-zhixi/springboot-oracledb

二、创建SpringBoot项目

  我的SpringBoot创建项目服务器URL使用的是阿里的:https://start.aliyun.com/

  创建项目,选择依赖:

  

三、IDEA连接数据库

数据表及测试数据

创建表以及测试数据,将全局的'ZHANGZHIXI'替换称为你使用的用户即可:

这里注意一个坑:在Oracle中如果建的表名或者字段名称是小写的,在查询的时候必须要加上双引号,否则会报错。

最简单的办法就是将表名以及字段名全部大写!

 

/*
 Navicat Premium Data Transfer

 Source Server         : 本地Oracle
 Source Server Type    : Oracle
 Source Server Version : 110200
 Source Host           : 127.0.0.1:1521
 Source Schema         : ZHANGZHIXI

 Target Server Type    : Oracle
 Target Server Version : 110200
 File Encoding         : 65001

 Date: 21/10/2022 17:03:44
*/


-- ----------------------------
-- Table structure for STUDENT
-- ----------------------------
DROP TABLE "ZHANGZHIXI"."STUDENT";
CREATE TABLE "ZHANGZHIXI"."STUDENT" (
  "ID" NUMBER NOT NULL,
  "NAME" VARCHAR2(255 BYTE),
  "AGE" NUMBER(2,0),
  "SEX" NVARCHAR2(2),
  "TEL" NUMBER,
  "EMAIL" VARCHAR2(255 BYTE),
  "BIRTHDAY" DATE,
  "CREATE_TIME" DATE,
  "UPDATE_TIME" DATE,
  "IS_DELETED" NUMBER
)
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
  INITIAL 65536 
  NEXT 1048576 
  MINEXTENTS 1
  MAXEXTENTS 2147483645
  BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "ZHANGZHIXI"."STUDENT"."ID" IS '主键';
COMMENT ON COLUMN "ZHANGZHIXI"."STUDENT"."NAME" IS '姓名';
COMMENT ON COLUMN "ZHANGZHIXI"."STUDENT"."AGE" IS '年龄';
COMMENT ON COLUMN "ZHANGZHIXI"."STUDENT"."SEX" IS '性别';
COMMENT ON COLUMN "ZHANGZHIXI"."STUDENT"."TEL" IS '电话号码';
COMMENT ON COLUMN "ZHANGZHIXI"."STUDENT"."EMAIL" IS '电子邮箱';
COMMENT ON COLUMN "ZHANGZHIXI"."STUDENT"."BIRTHDAY" IS '生日';
COMMENT ON COLUMN "ZHANGZHIXI"."STUDENT"."CREATE_TIME" IS '创建时间';
COMMENT ON COLUMN "ZHANGZHIXI"."STUDENT"."UPDATE_TIME" IS '更新时间';
COMMENT ON COLUMN "ZHANGZHIXI"."STUDENT"."IS_DELETED" IS '是否删除(0-未删除,1已删除)';

-- ----------------------------
-- Records of STUDENT
-- ----------------------------
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('1', '卢云熙', '12', '', '1093559558', 'luy@gmail.com', TO_DATE('2004-09-06 02:43:34', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2009-03-09 14:07:47', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2015-10-11 12:44:46', 'SYYYY-MM-DD HH24:MI:SS'), '1');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('2', 'Nathan Stone', '2', '', '2888696602', 'stone310@icloud.com', TO_DATE('2018-12-04 06:09:09', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2001-03-19 03:30:07', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2005-03-06 12:11:18', 'SYYYY-MM-DD HH24:MI:SS'), '0');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('3', '袁晓明', '3', '', '7609818595', 'yxiaoming@outlook.com', TO_DATE('2001-02-22 18:29:26', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2017-07-30 09:45:08', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2020-08-01 11:50:24', 'SYYYY-MM-DD HH24:MI:SS'), '0');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('4', '戴安琪', '4', '', '17793634695', 'daia@outlook.com', TO_DATE('2006-06-23 16:43:47', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2005-12-24 04:51:45', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2012-06-21 17:07:06', 'SYYYY-MM-DD HH24:MI:SS'), '0');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('5', '刘岚', '5', '', '18102128850', 'laliu8@outlook.com', TO_DATE('2015-07-20 19:11:18', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2019-01-02 20:46:19', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2020-11-17 09:04:12', 'SYYYY-MM-DD HH24:MI:SS'), '0');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('6', 'Jimmy Rodriguez', '6', '', '18278234794', 'rodjimmy10@icloud.com', TO_DATE('2022-09-19 12:09:30', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2017-05-19 03:29:18', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2003-03-29 11:31:24', 'SYYYY-MM-DD HH24:MI:SS'), '1');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('7', '金晓明', '7', '', '17487273125', 'xiaomingjin@gmail.com', TO_DATE('2008-10-20 15:00:20', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2002-03-02 05:32:42', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2009-03-12 13:05:00', 'SYYYY-MM-DD HH24:MI:SS'), '1');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('8', 'Edwin Crawford', '8', '', '217275946', 'ce223@gmail.com', TO_DATE('2004-06-14 17:28:11', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2010-10-06 21:18:31', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2013-09-04 13:26:27', 'SYYYY-MM-DD HH24:MI:SS'), '1');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('9', 'Marvin Reed', '9', '', '1081731384', 'mre@gmail.com', TO_DATE('2017-12-11 00:19:06', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2017-12-05 06:02:52', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2011-10-04 09:28:38', 'SYYYY-MM-DD HH24:MI:SS'), '0');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('10', '苏宇宁', '10', '', '203564742', 'yuning2@outlook.com', TO_DATE('2021-01-26 23:04:43', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2016-07-19 05:57:23', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2017-05-15 15:08:35', 'SYYYY-MM-DD HH24:MI:SS'), '1');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('11', '马致远', '11', '', '17417091908', 'zhiyuanma@outlook.com', TO_DATE('2013-02-27 17:03:31', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2010-09-08 00:19:58', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2000-04-19 11:10:25', 'SYYYY-MM-DD HH24:MI:SS'), '0');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('12', 'Roy Mitchell', '12', '', '17950753876', 'mitchellroy@yahoo.com', TO_DATE('2022-02-19 03:38:32', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2012-02-22 06:41:24', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2009-11-03 06:59:44', 'SYYYY-MM-DD HH24:MI:SS'), '0');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('13', '何云熙', '13', '', '17710765016', 'he9@gmail.com', TO_DATE('2002-08-04 12:31:32', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2022-10-06 00:43:16', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2018-04-30 10:02:40', 'SYYYY-MM-DD HH24:MI:SS'), '0');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('14', 'Sherry Weaver', '14', '', '2897860697', 'sherry78@mail.com', TO_DATE('2007-06-15 10:47:37', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2002-07-20 12:37:18', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2016-03-24 03:25:07', 'SYYYY-MM-DD HH24:MI:SS'), '1');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('15', 'Don Collins', '15', '', '219551327', 'dcolli728@icloud.com', TO_DATE('2000-05-23 06:35:34', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2012-07-24 13:18:42', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2001-05-03 05:47:24', 'SYYYY-MM-DD HH24:MI:SS'), '1');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('16', '阎璐', '16', '', '7602849913', 'yanlu@mail.com', TO_DATE('2006-07-28 15:56:48', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2002-03-19 11:12:18', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2010-04-02 03:46:07', 'SYYYY-MM-DD HH24:MI:SS'), '0');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('17', 'Fred Ramirez', '17', '', '2064678783', 'frramir@yahoo.com', TO_DATE('2003-06-02 15:28:56', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2015-11-03 13:00:39', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2006-11-24 17:30:16', 'SYYYY-MM-DD HH24:MI:SS'), '0');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('18', '袁子韬', '18', '', '2038948505', 'yuanzitao106@gmail.com', TO_DATE('2010-05-23 08:34:10', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2020-05-24 20:22:40', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2000-12-26 03:22:39', 'SYYYY-MM-DD HH24:MI:SS'), '0');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('19', '赵宇宁', '19', '', '13682475936', 'yuningzha505@outlook.com', TO_DATE('2000-06-02 02:46:35', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2003-07-26 14:57:57', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2005-11-01 04:49:04', 'SYYYY-MM-DD HH24:MI:SS'), '1');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('20', '陶晓明', '20', '', '13420721103', 'txiaoming@icloud.com', TO_DATE('2018-07-06 12:06:11', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2017-04-28 10:44:55', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2020-11-16 20:44:25', 'SYYYY-MM-DD HH24:MI:SS'), '0');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('21', 'Lois Vargas', '21', '', '19670614972', 'lv1107@outlook.com', TO_DATE('2011-11-26 13:30:24', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2014-01-25 22:44:11', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2001-06-29 14:39:34', 'SYYYY-MM-DD HH24:MI:SS'), '0');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('22', 'Marjorie Harrison', '22', '', '282592651', 'harrisonma@hotmail.com', TO_DATE('2016-03-19 21:10:09', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2020-04-30 05:54:58', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2017-07-31 07:20:01', 'SYYYY-MM-DD HH24:MI:SS'), '1');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('23', 'Marilyn Scott', '23', '', '15888639662', 'mscott5@gmail.com', TO_DATE('2014-06-01 14:24:12', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2011-11-12 09:14:31', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2004-09-09 22:51:58', 'SYYYY-MM-DD HH24:MI:SS'), '0');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('24', '黎子韬', '24', '', '16596132809', 'zital65@hotmail.com', TO_DATE('2005-10-17 15:03:15', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2021-09-20 17:30:34', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2018-12-10 08:57:42', 'SYYYY-MM-DD HH24:MI:SS'), '1');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('25', 'Tiffany Rodriguez', '25', '', '15217429731', 'rtiffany3@yahoo.com', TO_DATE('2004-08-14 06:49:43', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2018-05-31 01:10:43', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2003-11-13 13:49:52', 'SYYYY-MM-DD HH24:MI:SS'), '0');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('26', '武安琪', '26', '', '15982871396', 'awu@outlook.com', TO_DATE('2018-10-15 23:10:41', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2015-07-03 22:53:47', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2022-06-21 22:02:08', 'SYYYY-MM-DD HH24:MI:SS'), '0');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('27', '邓秀英', '27', '', '283793115', 'xiuyingdeng@yahoo.com', TO_DATE('2004-01-25 19:03:30', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2004-10-11 07:25:55', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2015-06-26 05:25:59', 'SYYYY-MM-DD HH24:MI:SS'), '0');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('28', '龚致远', '28', '', '17684835873', 'zhiyuangong502@mail.com', TO_DATE('2015-11-15 12:35:26', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2009-04-10 10:53:20', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2006-08-20 15:26:53', 'SYYYY-MM-DD HH24:MI:SS'), '0');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('29', '罗璐', '29', '', '286603127', 'luluo@outlook.com', TO_DATE('2000-04-17 16:25:36', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2020-12-11 12:13:27', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2011-08-10 00:28:42', 'SYYYY-MM-DD HH24:MI:SS'), '0');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('30', 'Kathryn Vargas', '30', '', '288056118', 'kv713@gmail.com', TO_DATE('2003-09-20 13:15:18', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2000-10-21 21:00:55', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2015-09-28 02:55:57', 'SYYYY-MM-DD HH24:MI:SS'), '1');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('31', 'Heather Moreno', '31', '', '16654502603', 'morenoheat@hotmail.com', TO_DATE('2016-10-01 17:08:45', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2010-09-26 06:12:31', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2020-10-09 19:23:06', 'SYYYY-MM-DD HH24:MI:SS'), '0');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('32', '戴安琪', '32', '', '16538259792', 'daia91@icloud.com', TO_DATE('2020-04-26 01:42:47', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2017-06-21 14:55:07', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2020-06-06 12:20:08', 'SYYYY-MM-DD HH24:MI:SS'), '0');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('33', 'Craig Gibson', '33', '', '75550733228', 'cgi@yahoo.com', TO_DATE('2007-11-05 13:57:24', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2011-12-08 22:32:23', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2009-03-11 10:48:23', 'SYYYY-MM-DD HH24:MI:SS'), '1');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('34', '史璐', '34', '', '76943743919', 'shilu54@gmail.com', TO_DATE('2001-06-21 20:09:44', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2016-07-18 00:27:31', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2017-12-24 04:16:37', 'SYYYY-MM-DD HH24:MI:SS'), '1');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('35', 'Monica Adams', '35', '', '76015629817', 'adammonic@yahoo.com', TO_DATE('2003-06-28 02:12:38', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2007-03-31 17:49:40', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2002-07-27 22:49:55', 'SYYYY-MM-DD HH24:MI:SS'), '1');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('36', 'Jean Graham', '36', '', '280960921', 'jeangraham@icloud.com', TO_DATE('2012-05-14 13:38:14', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2010-08-02 17:25:49', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2013-04-08 15:17:14', 'SYYYY-MM-DD HH24:MI:SS'), '0');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('37', 'George Torres', '37', '', '2824997957', 'torresg@icloud.com', TO_DATE('2016-10-06 02:50:00', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2001-08-27 20:17:08', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2000-04-28 10:39:04', 'SYYYY-MM-DD HH24:MI:SS'), '0');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('38', 'Monica Sanders', '38', '', '288051875', 'monicasanders@gmail.com', TO_DATE('2022-09-15 06:47:33', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2013-02-10 15:00:24', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2019-11-17 13:11:03', 'SYYYY-MM-DD HH24:MI:SS'), '1');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('39', '范宇宁', '39', '', '76003633729', 'yufan5@gmail.com', TO_DATE('2019-07-12 12:17:18', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2004-03-24 03:56:37', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2014-08-13 08:40:56', 'SYYYY-MM-DD HH24:MI:SS'), '0');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('40', 'Roy Roberts', '40', '', '75535804305', 'robertsr66@icloud.com', TO_DATE('2013-02-19 11:36:37', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2007-11-30 02:07:01', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2005-09-01 12:44:39', 'SYYYY-MM-DD HH24:MI:SS'), '0');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('41', '顾宇宁', '41', '', '13310667181', 'yunig@yahoo.com', TO_DATE('2002-04-25 23:27:35', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2010-10-17 17:38:32', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2013-02-21 20:17:45', 'SYYYY-MM-DD HH24:MI:SS'), '0');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('42', 'Lori Kennedy', '42', '', '13913418526', 'lok@gmail.com', TO_DATE('2008-11-16 04:40:10', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2013-10-16 09:57:53', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2016-07-20 18:37:14', 'SYYYY-MM-DD HH24:MI:SS'), '0');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('43', 'Stanley Freeman', '43', '', '15884873124', 'fstanley@mail.com', TO_DATE('2002-03-09 18:19:40', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2020-06-27 17:11:38', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2001-01-08 16:31:54', 'SYYYY-MM-DD HH24:MI:SS'), '1');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('44', '戴嘉伦', '44', '', '14567269241', 'jialundai@icloud.com', TO_DATE('2014-06-12 02:29:49', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2012-05-03 18:34:34', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2009-02-14 11:03:54', 'SYYYY-MM-DD HH24:MI:SS'), '1');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('45', '谭杰宏', '45', '', '14799760440', 'tanjiehong@gmail.com', TO_DATE('2015-02-27 11:04:07', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2002-11-06 18:18:09', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2012-06-28 06:33:08', 'SYYYY-MM-DD HH24:MI:SS'), '1');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('46', 'Harold Simpson', '46', '', '2819824232', 'haroldsimp1967@outlook.com', TO_DATE('2005-03-02 14:36:03', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2003-02-05 07:44:01', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2015-09-13 18:30:07', 'SYYYY-MM-DD HH24:MI:SS'), '1');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('47', 'Jimmy Harrison', '47', '', '217302821', 'jiharr@outlook.com', TO_DATE('2015-02-23 06:48:07', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2005-05-21 17:36:33', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2009-02-05 01:03:56', 'SYYYY-MM-DD HH24:MI:SS'), '1');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('48', 'Shawn Moreno', '48', '', '19187407048', 'moreno928@icloud.com', TO_DATE('2009-01-03 03:23:07', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2021-02-06 18:59:27', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2015-02-23 22:46:52', 'SYYYY-MM-DD HH24:MI:SS'), '0');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('49', 'Hazel Roberts', '49', '', '76931762715', 'roberhaze@yahoo.com', TO_DATE('2008-02-08 08:25:56', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2008-06-03 09:29:27', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2012-08-01 06:05:39', 'SYYYY-MM-DD HH24:MI:SS'), '1');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('50', '范岚', '50', '', '7698331382', 'fan8@mail.com', TO_DATE('2022-08-10 02:22:17', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2009-07-31 22:59:21', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2010-07-16 21:34:22', 'SYYYY-MM-DD HH24:MI:SS'), '0');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('51', 'Gloria Grant', '51', '', '76053881775', 'grantgl3@outlook.com', TO_DATE('2015-05-03 18:16:57', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2021-04-09 16:49:15', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2007-11-11 21:26:49', 'SYYYY-MM-DD HH24:MI:SS'), '1');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('52', 'Paula Lewis', '52', '', '17984880327', 'lpaul1125@icloud.com', TO_DATE('2007-09-27 22:27:12', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2020-12-10 02:07:45', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2022-08-21 10:05:13', 'SYYYY-MM-DD HH24:MI:SS'), '0');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('53', '雷璐', '53', '', '14673202823', 'll2@yahoo.com', TO_DATE('2006-01-02 16:35:56', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2010-10-02 06:42:54', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2019-10-21 12:25:48', 'SYYYY-MM-DD HH24:MI:SS'), '0');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('54', '谭震南', '54', '', '14639729931', 'zhentan@hotmail.com', TO_DATE('2018-08-31 15:29:45', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2013-08-17 06:49:20', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2013-04-14 01:08:24', 'SYYYY-MM-DD HH24:MI:SS'), '0');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('55', 'Michelle Reed', '55', '', '108047839', 'micheller52@mail.com', TO_DATE('2007-12-03 08:25:37', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2020-08-13 04:57:31', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2006-10-23 21:37:09', 'SYYYY-MM-DD HH24:MI:SS'), '1');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('56', '杜晓明', '56', '', '15205505334', 'duxia@gmail.com', TO_DATE('2015-01-01 03:23:35', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2000-05-31 08:25:52', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2012-12-07 15:37:08', 'SYYYY-MM-DD HH24:MI:SS'), '1');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('57', '周震南', '57', '', '105616986', 'zhozhennan7@mail.com', TO_DATE('2022-05-09 03:15:02', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2005-12-12 03:52:25', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2015-10-25 13:06:36', 'SYYYY-MM-DD HH24:MI:SS'), '1');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('58', 'Stephen Hall', '58', '', '75558018774', 'hallstephen45@mail.com', TO_DATE('2005-05-09 12:37:27', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2015-10-02 08:07:15', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2002-02-25 12:20:56', 'SYYYY-MM-DD HH24:MI:SS'), '1');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('59', 'Troy Johnson', '59', '', '2877493193', 'johnsontroy@outlook.com', TO_DATE('2008-05-29 20:45:40', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2006-07-27 15:09:24', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2003-05-05 14:42:12', 'SYYYY-MM-DD HH24:MI:SS'), '0');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('60', 'Barry Munoz', '60', '', '214077508', 'bamu@mail.com', TO_DATE('2003-03-13 04:57:28', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2002-08-25 22:08:53', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2010-03-07 06:07:02', 'SYYYY-MM-DD HH24:MI:SS'), '0');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('61', '严子异', '61', '', '18136301931', 'ziyi7@outlook.com', TO_DATE('2014-07-25 00:58:34', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2007-10-08 05:17:22', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2007-10-20 04:19:48', 'SYYYY-MM-DD HH24:MI:SS'), '0');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('62', '魏嘉伦', '62', '', '17366833444', 'jialun309@hotmail.com', TO_DATE('2003-04-30 13:29:31', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2010-10-15 08:54:05', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2004-07-29 01:13:06', 'SYYYY-MM-DD HH24:MI:SS'), '0');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('63', 'Amanda Harrison', '63', '', '2827590774', 'harria@yahoo.com', TO_DATE('2006-06-30 15:27:22', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2014-11-20 21:00:27', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2015-03-21 09:08:07', 'SYYYY-MM-DD HH24:MI:SS'), '1');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('64', 'Laura Sanchez', '64', '', '76950038517', 'laursanch@icloud.com', TO_DATE('2012-02-26 19:19:30', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2012-02-20 16:37:34', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2007-05-06 11:17:59', 'SYYYY-MM-DD HH24:MI:SS'), '1');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('65', 'Annie Young', '65', '', '13773339569', 'anniey1215@hotmail.com', TO_DATE('2019-05-01 09:58:59', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2019-03-07 11:11:39', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2016-04-25 23:01:55', 'SYYYY-MM-DD HH24:MI:SS'), '1');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('66', 'Anne Bailey', '66', '', '15914209289', 'bailey80@gmail.com', TO_DATE('2010-03-26 10:48:16', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2009-07-04 05:31:58', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2011-04-05 22:31:36', 'SYYYY-MM-DD HH24:MI:SS'), '0');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('67', 'Don Martinez', '67', '', '217199485', 'donmarti8@gmail.com', TO_DATE('2000-05-31 01:55:01', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2017-12-27 15:39:42', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2019-12-19 11:03:21', 'SYYYY-MM-DD HH24:MI:SS'), '0');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('68', '罗安琪', '68', '', '7693429588', 'luoanqi@outlook.com', TO_DATE('2013-02-02 23:08:29', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2020-03-04 21:15:27', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2006-04-30 07:31:52', 'SYYYY-MM-DD HH24:MI:SS'), '0');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('69', '吴震南', '69', '', '15447224935', 'wu7@gmail.com', TO_DATE('2018-01-06 11:41:31', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2000-06-13 17:00:45', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2014-04-02 07:51:54', 'SYYYY-MM-DD HH24:MI:SS'), '1');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('70', 'Marie Ryan', '70', '', '14717021300', 'rmarie@hotmail.com', TO_DATE('2001-09-18 07:48:53', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2001-12-28 19:59:12', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2017-08-23 06:10:43', 'SYYYY-MM-DD HH24:MI:SS'), '1');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('71', '蔡晓明', '71', '', '210323449', 'cai10@mail.com', TO_DATE('2013-01-28 20:49:42', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2009-06-09 09:12:49', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2014-09-06 17:58:43', 'SYYYY-MM-DD HH24:MI:SS'), '0');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('72', '郑宇宁', '72', '', '288575651', 'zheng81@icloud.com', TO_DATE('2002-07-22 04:15:40', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2011-06-03 17:47:42', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2002-07-20 15:11:32', 'SYYYY-MM-DD HH24:MI:SS'), '0');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('73', 'Eddie Mason', '73', '', '18351943484', 'masoneddie74@gmail.com', TO_DATE('2020-02-25 06:01:20', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2010-12-03 08:29:57', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2019-12-13 22:09:31', 'SYYYY-MM-DD HH24:MI:SS'), '1');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('74', '周震南', '74', '', '108518819', 'zhouzhenn@hotmail.com', TO_DATE('2010-01-14 16:27:45', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2008-06-12 07:14:22', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2013-02-14 16:44:17', 'SYYYY-MM-DD HH24:MI:SS'), '0');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('75', '戴璐', '75', '', '14360755808', 'dai6@outlook.com', TO_DATE('2003-05-27 05:58:15', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2021-10-18 16:39:56', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2016-06-29 23:40:03', 'SYYYY-MM-DD HH24:MI:SS'), '0');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('76', 'Jamie Kennedy', '76', '', '76050395184', 'jamiekennedy123@icloud.com', TO_DATE('2016-10-27 03:14:06', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2022-09-13 11:26:11', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2016-05-01 15:54:47', 'SYYYY-MM-DD HH24:MI:SS'), '1');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('77', 'Kim Myers', '77', '', '13335821830', 'kmy718@yahoo.com', TO_DATE('2016-01-15 12:28:09', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2008-09-07 15:25:44', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2010-04-13 02:38:30', 'SYYYY-MM-DD HH24:MI:SS'), '1');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('78', '孟詩涵', '78', '', '19899725793', 'mshihan1994@gmail.com', TO_DATE('2021-02-11 00:34:43', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2009-06-11 09:22:30', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2007-10-30 06:31:49', 'SYYYY-MM-DD HH24:MI:SS'), '0');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('79', 'Eddie King', '79', '', '213220389', 'kingedd@mail.com', TO_DATE('2004-10-23 20:28:26', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2020-12-22 23:50:32', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2004-09-28 16:51:49', 'SYYYY-MM-DD HH24:MI:SS'), '1');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('80', 'Keith Coleman', '80', '', '17903498901', 'colemankei@gmail.com', TO_DATE('2004-08-22 17:21:06', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2000-10-24 04:26:48', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2009-12-08 21:35:58', 'SYYYY-MM-DD HH24:MI:SS'), '1');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('81', 'Henry Warren', '81', '', '19509853559', 'hwa@outlook.com', TO_DATE('2018-10-12 17:15:40', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2001-03-19 21:19:32', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2015-08-31 09:20:30', 'SYYYY-MM-DD HH24:MI:SS'), '1');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('82', '萧致远', '82', '', '16547386761', 'zhiyuanxiao8@outlook.com', TO_DATE('2006-03-09 00:13:05', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2005-02-20 17:21:48', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2016-05-09 15:30:37', 'SYYYY-MM-DD HH24:MI:SS'), '1');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('83', 'Brian Ramos', '83', '', '76007068679', 'ramosb6@icloud.com', TO_DATE('2005-05-15 12:05:17', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2011-08-21 00:00:51', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2002-09-06 03:48:01', 'SYYYY-MM-DD HH24:MI:SS'), '0');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('84', 'Catherine Daniels', '84', '', '2195607015', 'danielscatherine@outlook.com', TO_DATE('2021-12-31 02:36:31', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2020-09-04 13:54:43', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2005-07-20 10:19:11', 'SYYYY-MM-DD HH24:MI:SS'), '0');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('85', 'Kathy Wallace', '85', '', '15227539529', 'wallakath209@mail.com', TO_DATE('2020-09-16 03:43:02', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2016-05-02 14:36:38', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2018-03-21 12:28:18', 'SYYYY-MM-DD HH24:MI:SS'), '1');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('86', '谭致远', '86', '', '16186672444', 'zhiyuanta@yahoo.com', TO_DATE('2014-12-26 04:50:44', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2011-08-12 00:48:59', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2006-08-25 21:59:34', 'SYYYY-MM-DD HH24:MI:SS'), '0');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('87', 'Micheal Silva', '87', '', '18681382988', 'sm7@yahoo.com', TO_DATE('2021-08-31 12:27:31', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2017-09-09 14:35:21', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2010-03-09 09:05:51', 'SYYYY-MM-DD HH24:MI:SS'), '1');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('88', 'Travis Phillips', '88', '', '19774259723', 'tphillips520@gmail.com', TO_DATE('2009-06-11 03:33:45', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2019-11-03 13:11:51', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2006-11-16 09:57:53', 'SYYYY-MM-DD HH24:MI:SS'), '1');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('89', 'Kelly Gomez', '89', '', '15739546777', 'gomez9@gmail.com', TO_DATE('2009-05-30 10:26:50', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2010-07-01 11:57:12', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2002-02-28 10:37:58', 'SYYYY-MM-DD HH24:MI:SS'), '0');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('90', '李詩涵', '90', '', '76095131319', 'lshihan@outlook.com', TO_DATE('2022-01-12 07:32:21', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2020-05-26 07:53:02', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2016-11-15 02:52:13', 'SYYYY-MM-DD HH24:MI:SS'), '1');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('91', 'Justin Rodriguez', '91', '', '13274747429', 'justinrod@icloud.com', TO_DATE('2007-11-02 10:45:11', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2015-11-28 11:39:17', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2020-01-25 21:31:43', 'SYYYY-MM-DD HH24:MI:SS'), '0');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('92', '江岚', '92', '', '76982818805', 'jlan@yahoo.com', TO_DATE('2010-09-06 02:08:37', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2004-07-17 16:40:52', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2021-04-04 19:59:41', 'SYYYY-MM-DD HH24:MI:SS'), '0');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('93', '曹安琪', '93', '', '13506366838', 'anc@outlook.com', TO_DATE('2019-12-29 03:20:05', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2010-06-26 13:06:15', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2017-01-10 04:54:10', 'SYYYY-MM-DD HH24:MI:SS'), '1');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('94', 'Emma Jones', '94', '', '19360661205', 'jones8@outlook.com', TO_DATE('2001-05-28 22:44:14', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2021-09-19 04:26:57', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2011-04-21 20:11:03', 'SYYYY-MM-DD HH24:MI:SS'), '0');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('95', 'Randall Young', '95', '', '13993230850', 'youngrandall@icloud.com', TO_DATE('2021-11-24 02:29:10', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2008-08-01 08:07:01', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2006-08-29 17:57:19', 'SYYYY-MM-DD HH24:MI:SS'), '1');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('96', 'Antonio Robinson', '96', '', '18129907225', 'robianto@outlook.com', TO_DATE('2016-06-02 13:25:38', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2018-12-05 22:57:44', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2011-03-12 06:44:06', 'SYYYY-MM-DD HH24:MI:SS'), '1');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('97', 'Nancy Cole', '97', '', '14578751296', 'ncole1@icloud.com', TO_DATE('2010-07-18 12:40:42', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2022-03-07 16:36:46', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2015-07-25 08:41:36', 'SYYYY-MM-DD HH24:MI:SS'), '1');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('98', '梁秀英', '98', '', '76065261859', 'xliang@hotmail.com', TO_DATE('2016-05-04 16:14:27', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2011-08-24 14:37:43', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2008-11-09 02:27:17', 'SYYYY-MM-DD HH24:MI:SS'), '1');
INSERT INTO "ZHANGZHIXI"."STUDENT" VALUES ('99', 'Ethel Jackson', '99', '', '7551839696', 'jackson94@icloud.com', TO_DATE('2002-03-12 03:35:01', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2004-06-13 17:56:43', 'SYYYY-MM-DD HH24:MI:SS'), TO_DATE('2016-01-16 21:21:36', 'SYYYY-MM-DD HH24:MI:SS'), '1');

-- ----------------------------
-- Primary Key structure for table STUDENT
-- ----------------------------
ALTER TABLE "ZHANGZHIXI"."STUDENT" ADD CONSTRAINT "SYS_C0011904" PRIMARY KEY ("ID");

-- ----------------------------
-- Checks structure for table STUDENT
-- ----------------------------
ALTER TABLE "ZHANGZHIXI"."STUDENT" ADD CONSTRAINT "SYS_C0011903" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
View Code

 

 

四、MybatisX插件自动生成代码

参考:https://www.cnblogs.com/zhangzhixi/p/14395401.html#_label0_17

五、测试

SpringBoot操作Oracle-进行CRUD

INSERT

1、数据表

-- auto-generated definition
create table TEST_USER
(
    ID      NUMBER not null
        constraint TEST_USER_PK
            primary key,
    NAME    VARCHAR2(255),
    AGE     NUMBER,
    ADDRESS VARCHAR2(255)
)
/
comment on table TEST_USER is '测试用的表'
/
comment on column TEST_USER.ID is '主键
'
/
comment on column TEST_USER.NAME is '姓名
'
/
comment on column TEST_USER.AGE is '年龄'
/
comment on column TEST_USER.ADDRESS is '地址'
/

2、实体类  

package mixky.bjcc.pojo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Builder;
import lombok.Data;

import java.io.Serializable;

/**
 * 测试用的表
 * @TableName TEST_USER
 */
@TableName(value ="TEST_USER")
@Data
@Builder
public class TestUser implements Serializable {
    /**
     * 主键

     */
    @TableId(value = "ID")
    private Long id;

    /**
     * 姓名

     */
    @TableField(value = "NAME")
    private String name;

    /**
     * 年龄
     */
    @TableField(value = "AGE")
    private Long age;

    /**
     * 地址
     */
    @TableField(value = "ADDRESS")
    private String address;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}

3、dao接口

import mixky.bjcc.pojo.TestUser;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;

/**
* @author zhixi
* @description 针对表【TEST_USER(测试用的表)】的数据库操作Mapper
* @createDate 2022-10-19 19:31:07
* @Entity mixky.bjcc.pojo.TestUser
*/
@Repository
public interface TestUserMapper extends BaseMapper<TestUser> {
    int insertUser(TestUser user);
}

4、xml文件

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="mixky.bjcc.mapper.TestUserMapper">

    <!--这里useGeneratedKeys表示表明使用自增主键获取主键值策略,Oracle不支持自增主键,这里写不写false都可以-->
    <!--这里的'jdbcType=VARCHAR'表示该字段属性值为null的时候,插入NULL值-->
    <insert id="insertUser" parameterType="mixky.bjcc.pojo.TestUser" useGeneratedKeys="false">
        /*查询需要的主键字段*/
        <selectKey resultType="java.lang.Long" order="BEFORE" keyProperty="id">
            SELECT max(ID)+1 as id from bjccsy.TEST_USER
        </selectKey>

        /*执行插入sql*/
        insert into TEST_USER("ID", "NAME", "AGE","ADDRESS")
        values (
        #{id},
        #{name,jdbcType=VARCHAR},
        #{age,jdbcType=DOUBLE},
        #{address,jdbcType=VARCHAR}
        )
    </insert>

</mapper>

5、测试Mybatis插入

@Test
public void test() {
    TestUser testUser = TestUser.builder()
            .name("李四")
            .age(24L)
            .address("北京丰台")
            .build();
    userMapper.insertUser(testUser);
}

6、测试MybatisPlus插入

当然这里的id是由MP自动生成的ID,可以在实体类中设置,当然不设置的话也会自动生成。

或者可以先查出来表的最大ID,然后set到实体类的id字段,也是可以的,看自己的业务需求了。

/**
 * 主键
 */
@TableId(value = "ID", type = IdType.ASSIGN_ID)
private Long id;

posted @ 2022-09-27 11:13  Java小白的搬砖路  阅读(683)  评论(0编辑  收藏  举报