创建以下数据表(表格中内容不要有中文)
1.1登录信息表创建Student数据库
Create database StudentDB;
使用数据库
Use StudentDB;
创建登录信息表Login_info
Create table Login_info(ID varchar(10) primary key, Pwd varchar(10) default 123456, Job varchar(10) not null, Tel varchar(11) not null);
插入数据
Insert into Login_info(ID,Job,Tel) values(“1001”,”teacher”,”111111”),(“1002”,”teacher”,”222222”),(“10003”,”student”,”333333”),(“10004”,”student”,”444444”),(“10005”,”student”,”555555”);
创建学生信息表Student_info
Create table Student_info(ID varchar(10) primary key, Name varchar(10) not null, Sex varchar(10) not null, Age int not null, StudyDate Date not null, Major varchar(10) not null, Class int not null, Address varchar(15), Tel varchar(11) not null);
插入数据
Insert into Student_info Values(”10003”,”bob”,”boy”,19,20190901,”AI”,1902,”yantai”,”333333”),(“10004”,”pop”,”girl”,20,”20200901”,”NET”,2001,”weifang”,”444444”),(“10005”,”smith”,”girl”,21,”20210901”,”DL”,2101,”jinan”,”555555”);
创建学生成绩表Student_score
Create table Student_score(ID varchar(10) primary key, Name varchar(10) not null, Major varchar(10) not null, Class int not null, Math varchar(10) not null, Java varchar(10) not null, MySQL varchar(10) not null);
插入数据
Insert into Student_score Values(“10003”,”bob”,”AI”,1902,”66”,”77”,”88”),(“10004”,”pop”,”NET”,2001,”77”,”88”,”99”),(“10005”,”smith”,”DL”,2101,”88”,”77”,”66”);
根据表格内容自行对数据库中表格内容进行插入;
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)