SAS/sql/v2.sql

57 lines
1.1 KiB
MySQL
Raw Normal View History

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','<EFBFBD><EFBFBD><EFBFBD><EFBFBD>','<EFBFBD><EFBFBD>','<EFBFBD><EFBFBD><EFBFBD><EFBFBD>12004','<EFBFBD>ڶ<EFBFBD>'),
('2','<EFBFBD><EFBFBD><EFBFBD><EFBFBD>','Ů','<EFBFBD><EFBFBD><EFBFBD><EFBFBD>12004','<EFBFBD>ڶ<EFBFBD>'),
('3','<EFBFBD><EFBFBD><EFBFBD><EFBFBD>','Ů','<EFBFBD>ƿ<EFBFBD>12003','<EFBFBD>ڶ<EFBFBD>'),
('4','<EFBFBD><EFBFBD><EFBFBD><EFBFBD>','Ů','<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>12001','<EFBFBD>ڶ<EFBFBD>'),
('5','<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','<EFBFBD><EFBFBD>','<EFBFBD>ƿ<EFBFBD>12003','<EFBFBD>ڶ<EFBFBD>'),
('6','κ<EFBFBD><EFBFBD>˰','<EFBFBD><EFBFBD>','<EFBFBD><EFBFBD><EFBFBD><EFBFBD>12004','<EFBFBD>ڶ<EFBFBD>'),
('7','<EFBFBD><EFBFBD><EFBFBD><EFBFBD>','Ů','<EFBFBD>ƿ<EFBFBD>12003','<EFBFBD>ڶ<EFBFBD>'),
('8','<EFBFBD><EFBFBD><EFBFBD><EFBFBD>','<EFBFBD><EFBFBD>','<EFBFBD><EFBFBD><EFBFBD><EFBFBD>12004','<EFBFBD>ڶ<EFBFBD>');
insert into course
values
('C001','<EFBFBD><EFBFBD><EFBFBD><EFBFBD>'),
('C002','<EFBFBD><EFBFBD>ѧӢ<EFBFBD><EFBFBD>'),
('C003','<EFBFBD><EFBFBD><EFBFBD>Դ<EFBFBD><EFBFBD><EFBFBD>'),
('C004','<EFBFBD><EFBFBD>ѧ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>'),
('C005','C<EFBFBD><EFBFBD><EFBFBD><EFBFBD>'),
('C006','<EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
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);