这个作业属于哪个课程 | https://edu.cnblogs.com/campus/uzz/cs3 |
---|---|
这个作业要求在哪里 | https://edu.cnblogs.com/campus/uzz/cs3/homework/13057 |
这个作业的目标 | <SQL语句的基本使用2(修改表-基本查询)> |
alter table curriculum
-> drop 课程名称;
alter table grade
-> modify 分数 decimal(5,2);
alter table student_info
-> add 备注 varchar(50);
create database studb;
create table stu
-> select * from studentdb.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 出生日期>1995-01-01 and 性别='女';
select 学号,课程编号,分数 from grade where 分数>70 and 分数<80;
select avg(分数) from grade where 课程编号='0002';
mysql>
select count(*)as 选课人数和有成绩的人数 from grade where 课程编号='0003' and 分数!=' ';
mysql> select 姓名,出生日期 from student_info order by 出生日期 desc;
select 学号,姓名 from student_info where 姓名 like '张%';