数据库SQL语句练习题5--9

5、 查询Score表中成绩为85,86或88的记录。

select * from SCORE t where degree in (85,86,88)

6、 查询Student表中“95031”班或性别为“女”的同学记录。

select * from STUDENT t where class='95031' or ssex = ''

7、 以Class降序查询Student表的所有记录。

select * from STUDENT t order by class desc

8、 以Cno升序、Degree降序查询Score表的所有记录。

select * from SCORE t order by t.cno , t.degree desc

9、 查询“95031”班的学生人数。

select count(class) 人数 from STUDENT t where class='95031'

posted @ 2016-06-13 17:42  凌零聆  阅读(284)  评论(0编辑  收藏  举报