第三次作业

alter table curriculum drop 课程名称;

alter table grede modify 分数 decimal(5,2);

alter table student_info add 备注 varchar(50);


use studb;

create table stu  select * from studentsdb.student_info;
delete from stu where 学号 ='0004';
update stu set 家庭住址 ='滨江市新建路96号' where 学号 ='0002';
alter table stu drop 备注;
select 学号,姓名,出生日期 from student_info;

select 姓名,家族住址 from student_info where 学号 = '0002';
select 姓名,出生日期 from student_info where 性别 = '女' and 出生日期 > '1995';


delete from stu where 学号 ='0004';

update stu set 家庭住址='滨江市新建路96号' where 学号='0002';


alter table stu-> drop 备注;


select 学号,姓名,出生日期 from stu;

select 姓名,家庭住址 from stu where 学号='0002';

select 姓名,出生日期 from stu where 出生日期 between '1995-04-03' and '2000-10-01';

select 学号,课程编号,分数 from grade where 分数 between '70' and '80';

select avg(分数) from grade where 学号 ='0002';

select count (分数) from grade where 课程编号 ='0003';

select 姓名,出生日期 from stu order by 出生日期 desc;

select 学号,姓名 from stu where 姓名 like '张%';

posted @ 2023-10-01 20:10  邢加梁  阅读(11)  评论(0编辑  收藏  举报