设有一数据库,包括四个表:学生表(Student)、课程表(Course)、成绩表(Score)以及教师信息表(Teacher)。四个表的结构分别如表1-1的表(一)~表(四)所示,数据如表1-2的表(一)~表(四)所示。用SQL语句创建四个表并完成相关题目。

1、 查询Student表中的所有记录的Sname、Ssex和Class列。

select sname,ssex,class from STUDENT t

2、 查询教师所有的单位即不重复的Depart列。

select distinct depart from TEACHER t

3、 查询Student表的所有记录。

select * from STUDENT t

4、 查询Score表中成绩在60到80之间的所有记录。

select * from Score where Degree>=60 and Degree<=80

原文地址:https://www.cnblogs.com/wenwen123/p/5577944.html