试验七部分案.docVIP

  • 240
  • 0
  • 约2.67万字
  • 约 8页
  • 2016-12-11 发布于河南
  • 举报
试验七 Sql 查询语句 目的: 掌握 Select 查询语句。 一 单表 1查询年龄在19至21岁之间的女生的学号,姓名,年龄,按年龄从大到小排列。 select sno,sname,sage from student where sage between 19 and 21? and ssex=’女’ order by sage desc 2查询姓名中第戎2个字为“明”字的学生学号、性别。 select sname ,ssex from student where sname like ‘_明%’ 3查询 1001课程没有成绩的学生学号、课程号 select sno,cno? from sc? where grade is null and cno=’1001’ 4查询JSJ 、SX、WL 系的学生学号,姓名,结果按系及学号排列 select sno,sname from student where sdept in (‘JSJ’,’SX’,’WL’) order by sdept,sno 5按10分制查询学生的sno,cno,10分制成绩 ?? (1-10分 为1 ,11-20分为2 ,30-39分为3,。。。90-100为10) select sno , cno , grade/10.0+1 as level from sc 6查询 student 表中的学生共分布在那几

文档评论(0)

1亿VIP精品文档

相关文档