应该还有个选课表sc(sno,cno,grade)吧?
1.select distinct sdept from student;
2.select cname,count(sno) from course,sc where course.cno=sc.cno group by cname;
3.create table 学生2(学号 char(10) primary key,姓名 char(10),性别 char(2),出生日期 smalldatetime,所在系 char(10));
1、SELECT DISTINCT Sdept FROM Student;
2、SELECT COUNT(DISTINCT Cpno)
FROM Course
WHERE Cname = ' English ' ;
3、CREATE TABLE Student2
(Sno CHAR(9) PRIMARY KEY,
Sname CHAR(20) UNIQUE,
Ssex CHAR(2) ,
Sbirthday SMALLINT,
Sdept CHAR(20)
);