您的位置:自考365 > 复习指导 > 笔记串讲 > 工学 > 北大“数据库原理”上机实践题目总结(2)

北大“数据库原理”上机实践题目总结(2)

2007-07-18 14:37   【 】【我要纠错

  答案:4_1

  clear

  set talk off

  use s

  list off

  ?

  ?

  average age for sex=“w” to a

  ?“女生平均年龄:”

  ??str(a)

  ??“岁”

  set talk on

  return

  答案:4_2(需另建一个临时表:cc.dbf 属性为: cname ,sum,cxi )

  clear 例如: 高数 1 物理

  set talk off

  use cc

  index on teacher to liu

  total on teacher to yu fields 课程数

  use yu

  list off

  ?

  use cc

  sum 课程数 to a

  ?“课程总数:”

  ?? str(a)

  答案:4_3

  clear

  set talk off

  select sname,cname,grade;

  from s,sc,c1;

  where s.sno=sc.sno and c1.cno=sc.cno and c1.cno='1000';

  order by sc.grade desc

  set talk on

  答案:4_4

  clear

  set talk off

  select s.sno,s.sname,c1.cname,sc.grade;

  from s,c1,sc;

  where s.sno=sc.sno and c1.cno=sc.cno;

  and s.age in(select age;

  from s;

  where sname='古天乐')

  set talk on

本文转载链接:北大“数据库原理”上机实践题目总结(2)

分享到:
  • 站内搜索
  • 课程搜索
  • 试题搜索

热门搜索:教材 报名 查分 免考 考试计划