sqlServer2005习题与答案.docVIP

  • 240
  • 0
  • 约 17页
  • 2017-08-13 发布于河南
  • 举报
从学生表Student(Sno,Sname,Ssex,Sage,Sdept)中查询出全体学生的学号与姓名 1. 查询全体学生的详细记录 2. 显示前 5条纪录 3. 显示前 50%条纪录 4. 查询所有年龄在17岁以下的学生姓名及其年龄。 5. 某些学生选修课程后没有参加考试,所以有选课记录,但没有考试成绩。查询缺少成绩的学生的学号和相应的课程号。(成绩为null) 6. 查所有有成绩的学生学号和课程号 7. 查询学生的所有信息,按学号的降序排列 1.select * from student 2.select top 5 * from student 3.select top 50 percent * from student 4.select sname,sage from student where sage17 5.select sno,cno from sc where score is NULL 6.select sno,cno from sc where score is not NULL 7.select * from student order by sno desc 8 查询选修了课程的学生学号 9. 查全体学生的姓名及其出生年份,显示两列:姓名、出生年份 10. 查询年龄在15~17岁(包括15岁和17岁)之间

文档评论(0)

1亿VIP精品文档

相关文档