alter table grade MODIFY 分数 decimal(5,2);
![]()
alter table grade MODIFY 分数 decimal(5,2);
![]()
alter table student_info add 备注 varchar(50);
![]()
create DATABASE studb;
use studb;
create table stu select * from studentsdb.student_info;
delete from stu where 学号='004';
update stu set 家庭住址='滨江市新建路96号' where 学号='002';
alter table stu drop 备注;
![]()
use studentsdb;
select 学号,姓名,出生日期 from student_info;
![]()
select 学号,家庭住址 from student_info where 学号='002';
![]()
select 姓名,出生日期 from student_info where 出生日期>'1995-01-01' and 性别='女';
![]()
select 学号,课程编号,分数 from grade;
![]()
select avg(分数) from grade where 课程编号='002';
![]()
select count(*),count(分数) 有成绩的人数 from grade where 课程编号='003';
![]()
select 姓名,出生日期 from student_info order by 出生日期 desc;
![]()
select 姓名,学号 from student_info where 姓名 like '张%';
![]()