第1关:数据表中插入一条记录,对所有字
use jwxt;
#代码开始
insert into student (studentid,name,birthday,sex,nativeplace,political,interest,resume,photo) values('201221120101','王刚','1994-07-26','男','广西','团员','运动','2013年获得国家奖学金', ' ' );
#代码结束
本关任务:在student数据表中插入一条数据
学号202312010101, 姓名李向, 出生年月2000-08-30,性别男
use jwxt;
#代码开始
insert into student (studentid,name,birthday,sex,nativeplace,political,interest,resume,photo) values('2023120101','李向','2000-08-30','男',null,'群众',null,null,null);
#代码结束
select * from student;
use jwxt;
#代码开始
insert into student (studentid,name,birthday,sex,nativeplace,political,interest,resume,photo) values('201221120103','何丽洁','1994-08-30','女','辽宁','群众',null,null,null),('201221120105','彭悦','1993-08-19','男','湖南','群众',null,null,null),('201221120107','杨波','1994-02-20','男','山东','群众',null,null,null);
#代码结束
select * from student;
第4关 在数据表中修改单条数据记录的单个字段的值
use jwxt;
#代码开始
update course
set credit=3
where coursename='计算机概论';
#代码结束
select * from course;
use jwxt;
#代码开始
update course set period=16,credit=1 where coursename='英美文学';
#代码结束
select * from course;
第6关 修改数据表的多条记录
use jwxt;
#代码开始
update course set period=period+5 where required = '1';
#代码结束
select * from course;
第7关 删除数据表的多条记录
use jwxt;
#代码开始
delete from course where department ='新影院';
#代码结束
select * from course;
第8关 删除数据表的所有数据
use jwxt;
#代码开始
delete from course;
#代码结束
select * from course;