编辑代码

CREATE DATABASE test;
use test;
create table student(
sno char(9),
sname char(20),
ssex char(2),
sage smallint,
sdept char(40),
saddr char(100)
);
insert into student(sno,sname,ssex,sage,sdept)
values
('202030001','许可','女','18','CS'),
('202039847','刘才','男','17','MA'),
('202036463','张后','男','17','CS'),
('202234433','汪皓','男','18','CS');
select*
from student
where sdept='CS';
select*
from student
where sage='17';
select*
from student;
update student
set sage=sage-1
where sname='汪皓';
delete
from student
where sno='2022234433';