From 6bfb44a15a136b9c86ec9510dc9de26a29176ca4 Mon Sep 17 00:00:00 2001 From: zyx <1029606625@qq.com> Date: Tue, 5 Jul 2022 13:50:03 +0800 Subject: [PATCH] =?UTF-8?q?2022-07-05=2013:49=20=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=E5=88=9B=E5=BB=BA=E6=95=B0=E6=8D=AE=E5=BA=93=E3=80=81=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E8=A1=A8=E5=92=8C=E6=B7=BB=E5=8A=A0=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E7=9A=84sql=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- v2.sql | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 v2.sql diff --git a/v2.sql b/v2.sql new file mode 100644 index 0000000..85033c5 --- /dev/null +++ b/v2.sql @@ -0,0 +1,57 @@ +create database stuAdminSystem; + +use stuAdminSystem; + +create table student( + id nvarchar(10) primary key, + name nvarchar(15) not null, + sex nvarchar(5) not null, + stuClass nvarchar(20) not null, + status nvarchar(10) not null +); + +create table course( + id nvarchar(10) primary key, + name nvarchar(50) not null +); + +create table grade( + stuId nvarchar(10), + courseId nvarchar(10), + graded decimal(5,2) not null, + primary key(stuId,courseId) +); + + + +insert into student +values +('1','张三','男','软件12004','在读'), +('2','李四','女','软件12004','在读'), +('3','王五','女','计科12003','在读'), +('4','赵六','女','物联网12001','在读'), +('5','李恩情','男','计科12003','在读'), +('6','魏抵税','男','软件12004','在读'), +('7','张三','女','计科12003','在读'), +('8','李六','男','软件12004','在读'); + +insert into course +values +('C001','高数'), +('C002','大学英语'), +('C003','线性代数'), +('C004','大学物理'), +('C005','C语言'), +('C006','体育'); + +insert into grade +values +('1','C001',95), +('1','C002',90), +('1','C005',97), +('2','C006',75), +('2','C001',90), +('3','C005',76), +('4','C003',75), +('5','C001',78), +('8','C001',98); \ No newline at end of file