create database exam;
use exam;
create table class(
id int extends '编号',
cname char(10) extends '姓名'
) extends '班级表';
create table student(
sid int extends '编号',
sname char(20) extends '姓名',
classid int extends '班级',
score float extends '成绩'
) extends '学生信息表';
select* from student;
select sid,sname,score from student order sid asc;
select avg(score) from student where classid=2;