问题 单项选择题

~(35)题使用如下的“仓库”表和“职工”表,表结构如下:
仓库(仓库号C(3)、所在地C(8)、人数N(2))
职工(仓库号C(3)、职工号C(2)、姓名C(8)、工资I)

检索有职工的工资大于或等于“WH1”仓库中所有职工“工资”的仓库号,正确的命令是( )。

A.SELECT DISTINCT仓库号FROM职工WHERE工资>=ANY=; (SELECT MAX(工资)FROM职工WHERE仓库号="WH1")

B.SELECT DISTINCT仓库号FROM职工WHERE工资>=ANY; (SELECT工资FROM职工WHERE仓库号="WH1")

C.SELECT DISTINCT仓库号FROM职工WHERE工资>=ALL; (SELECT工资FROM职工WHERE仓库号="WH1")

D.SELECT DISTINCT仓库号FROM职工WHERE工资>=ALL; (SELECT MAX(工资)FROM职工WHERE仓库号="WH1")

答案

参考答案:C

解析: 选项C) 中的SQL语句通过子查询检索“WH1”仓库中所有职工的工资,然后在主查询中检索有职工工资大于子查询所查的工资的记录,即大于所有WH1中所有职工工资的职工所在的仓库号,DISTINCT短语的功能是去掉查询结果中重复的记录。 在SQL,语句中可以利用ANY、ALL等量词进行查询。其中,ANY(任意的)和SOME(一些)表示只要予查询中存在符合条件的行,结果就成立;而ALL(所有的)只有子查询中的所有的行都符合条件,结果才成立。

阅读理解

阅读短文,根据短文内容填上正确的单词  

    During his life Dr James Naismith worked as a doc-tor, taught P.E. and wrote several books. While he never thought it very important, Dr Naismith is today best known for one thing. He was the inventor of basketball.    

    Dr James Naismith was born in Canada in 1861 and his first job was at a special sports school in the USA.One day the school principal told James he was having a problem with the .students. Because of heavy snow, the students could not go outside. He told James that they needed a sport the boys could play indoors and gave the teacher two weeks to think of something.      

    It was on the very last day that James came up with  his idea. The" birth of basketball "is said to be on Decem- ber 21,1891,when two teams from the school played the first game. It was quite different from the basketball games of today. It had 9 players on each team and foot- balls were used instead of basketballs. Soon after, the game changed t0 5 players on each side, using special  " basketballs" through nets.     

   Although Dr Naismith did not live to see basketball become the worldwide game it is today, in 1936,just three years before his death, basketball became an Olym- pic sport. at the games in Berlin.  

1. Dr Naismith is ________ ________as the inventor of bas-ketball.

2. December 21,1891 was said co be the ________of bas-ketball.  

3. Today basketball has become the________ game.  

4. Dr Naismith died at the age of ________ .

5. Basketball became an________ sport at the games inBerlin in 1936.

单项选择题