目录
再点击表----刷新一下-----即可看到所有需要的表都已经被创建好了
首先可以在桌面创建.text文件----修改文件为.sql文件(如下)
/*
Navicat SQLite Data Transfer
Source Server : school
Source Server Version : 30808
Source Host : :0
Target Server Type : SQLite
Target Server Version : 30808
File Encoding : 65001
Date: 2021-12-23 16:06:04
*/
PRAGMA foreign_keys = OFF;
-- ----------------------------
-- Table structure for Course
-- ----------------------------
DROP TABLE IF EXISTS "main"."Course";
CREATE TABLE Course(
courseid integer primary key autoincrement,
courseme varchar(32),
teacherid int
);
-- ----------------------------
-- Records of Course
-- ----------------------------
INSERT INTO "main"."Course" VALUES (3001, '语文', 1001);
INSERT INTO "main"."Course" VALUES (3002, '数学', 1002);
-- ----------------------------
-- Table structure for Mark
-- ----------------------------
DROP TABLE IF EXISTS "main"."Mark";
CREATE TABLE Mark(
userid integer,
courseid integer not null,
score int default 0
);
-- ----------------------------
-- Records of Mark
-- ----------------------------
INSERT INTO "main"."Mark" VALUES (2001, 3001, 89);
INSERT INTO "main"."Mark" VALUES (2001, 3002, 90);
INSERT INTO "main"."Mark" VALUES (2002, 3001, 66);
INSERT INTO "main"."Mark" VALUES (2003, 3002, 85);
-- ----------------------------
-- Records of sqlite_sequence
-- ----------------------------
INSERT INTO "main"."sqlite_sequence" VALUES ('Teacher', 1002);
INSERT INTO "main"."sqlite_sequence" VALUES ('Student', 2002);
INSERT INTO "main"."sqlite_sequence" VALUES ('Course', 3002);
-- ----------------------------
-- Table structure for Student
-- ----------------------------
DROP TABLE IF EXISTS "main"."Student";
CREATE TABLE Student(
userid integer primary key autoincrement,
username varchar(32),
userage int,
usersex varchar(32)
);
-- ----------------------------
-- Records of Student
-- ----------------------------
INSERT INTO "main"."Student" VALUES (2001, '小明', 18, '男');
INSERT INTO "main"."Student" VALUES (2002, '小红', 18, '女');
-- ----------------------------
-- Table structure for Teacher
-- ----------------------------
DROP TABLE IF EXISTS "main"."Teacher";
CREATE TABLE Teacher(
teacherid integer primary key autoincrement,
teachername varchar(32)
);
-- ----------------------------
-- Records of Teacher
-- ----------------------------
INSERT INTO "main"."Teacher" VALUES (1001, '张三');
INSERT INTO "main"."Teacher" VALUES (1002, '李四');
先自我介绍一下,小编13年上师交大毕业,曾经在小公司待过,去过华为OPPO等大厂,18年进入阿里,直到现在。深知大多数初中级java工程师,想要升技能,往往是需要自己摸索成长或是报班学习,但对于培训机构动则近万元的学费,着实压力不小。自己不成体系的自学效率很低又漫长,而且容易碰到天花板技术停止不前。因此我收集了一份《java开发全套学习资料》送给大家,初衷也很简单,就是希望帮助到想自学又不知道该从何学起的朋友,同时减轻大家的负担。添加下方名片,即可获取全套学习资料哦