问题 单项选择题

(31)到(35)题使用如下数据表。
“学生”表:学号C(8),姓名C(8),性别C(2),系名(10),出生日期D
“课程”表:课程编号C(4),课程名称C(12),开课系名C(10)
“成绩”表:学号C(8),课程编号C(4),成绩I

利用SQL派生一个包含“课程名称”、“姓名”和“成绩”的视图,要求按“课程名称”升序排序,正确的语句是( )。

A.CREATE VIEW view1 AS;
(SELECT课程.课程名称,学生.姓名,成绩.成绩;
FROM课程INNER JOIN成绩;
INNER JOIN学生:
ON成绩.学号=学生.学号;
ON课程.课程编号=成绩.课程编号;
GROUP BY课程名称)

B.CREATE VIEW view1 AS;
(SELECT课程.课程名称,学生.姓名,成绩.成绩;
FROM课程INNER JOIN成绩;
INNER JOIN学生:
ON成绩.学号=学生.学号;
ON课程.课程编号=成绩.课程编号;
ORDER BY课程名称)

C.CREATE VIEW view1 AS;
SELECT课程.课程名称,学生.姓名,成绩.成绩;
FROM课程INNER JOIN成绩;
INNER JOIN学生:
ON成绩.学号=学生.学号;
ON课程.课程编号=成绩.课程编号;
GROUP BY课程名称

D.CREATE VIEW view1 AS;
SELECT课程.课程名称,学生.姓名,成绩.成绩;
FROM课程INNER JOIN成绩;
INNER JOIN学生;
ON成绩.学号=学生.学号;
ON课程.课程编号=成绩.课程编号;
ORDER BY课程名称

答案

参考答案:D

解析: 利用SQL命令可以定义直接建立视图,命令格式如下:
CREATE VIEW视图名AS;
SELECT语句
注意:在定义视图时,SELECT语句部分不需要用括号括起来,用来排序的SQL短语是ORDER BY,而GROUP BY短语的功能是对记录进行分组。

完形填空

In some cities , workaholism(废寝忘食工作)is so common that people don’t consider it unusual . They accept the lifestyle as      36     . Government workers in Washington , D. C. , 37      , frequently work sixty to seventy hours a week . They don’t do this because they have to ; they do it because they       38    to . Workaholism can be a     39     problem . Because true workaholics would rather work than do anything else , they      40     have no idea of how to relax ; that is , they might not     41      movies , sports , or other types of entertainment . Most of all , they     42      to sit and do nothing . The lives of workaholics are usually stressful , and this tension(紧张)and worry can cause      43     problems such as heart attacks and stomach diseases .     44     , typical workaholics don’t pay much attention to their families . Their marriages may end in      45     as they spend little time with their families .

Is workaholism      46     dangerous ? Perhaps not . There are , certainly , people who work      47     under stress . Some studies show that many workaholics have great energy and interest in work . They feel     48      is so pleasurable that they are actually very happy . For most workaholics , work and entertainment are the same thing . Their jobs      49     them with a challenge ; this keeps them busy and creative .

50     do workaholics enjoy their jobs so much ? There are several      51     to work . Of course , it provides people with paychecks , and this is important . But it offers     52      financial security . It provides people with self-confidence(自信心); they have a feeling of satisfaction       53    they have produced a challenging piece of work and are able to say “I      54     it” . Psychologists (心理学家)claim that their work gives people an identity (自身价值). After they take part in work , they     55     a sense of self and individualism .

36.A.strange                  B.boring                   C.pleasant                 D.normal

37.A.for example           B.on the other hand    C.what’s more           D.after all

38.A.agree                     B.promise                 C.dare                       D.want

39.A.slight                     B.serious                   C.obvious                  D.difficult

40.A.still                        B.probably                C.certainly                D.mostly

41.A.afford                    B.enjoy                     C.watch                    D.allow

42.A.dream                    B.decide                    C.intend                    D.hate

43.A.physical                 B.cultural                  C.social                     D.mental

44.A.Therefore               B.However                C.Anyway                 D.Besides

45.A.happiness               B.silence                   C.failure                   D.surprise

46.A.sometimes              B.always                   C.seldom                   D.hardly

47.A.sadly                     B.differently              C.efficiently              D.slowly

48.A.study                     B.family                   C.life                        D.work

49.A.equip                     B.pack                      C.provide                  D.fill

50.A.When                    B.Why                      C.How                      D.Where

51.A.factors                   B.advantages             C.steps                      D.ways

52.A.no more                 B.more or less            C.no more than          D.more than

53.A.when                     B.before                    C.unless                    D.until

54.A.valued                   B.failed                     C.caught                   D.made

55.A.give                             B.lose                       C.get                        D.need

问答题 简答题