问题 单项选择题

下列各题使用如下表:
职工表(仓库号,职工号,工资,出生同期)

建立一个视图salary,该视图包括了仓库号和(该仓库的)平均工资两个字段,正确的SQL语句是:______。

A.CREATE VIEW salary AS仓库号,AVG(52资)AS平均工资FROM职工表GROUP BY仓库号

B.CREATE VIEW salary AS SELECT仓库号,AVG(工资)AS平均工资FROM职工表GROUP BY职工号

C.CREATEVIEW Salary SELECT仓库号,AVG(工资)AS平均工资FROM职工表GROUPBY仓库号

D.CREATE VIEW salary AS SELECT仓库号,AVG(工资)AS平均工资FROM职工表GROUP BY仓库号

答案

参考答案:D

解析: 视图定义格式为:CREATE VIEW视图名[列名1,列名2,…] AS SELECT_Statement。本题解题思路是先从基本表中取出仓库号、平均工资,然后按仓库号进行分组,最后把得出的结论建立视图。因此,选项A没有选择SELECT语句,无法选择;选项B应该按仓库号进行分组;选项C格式不对,在SELECT前应加AS。

单项选择题
阅读理解

Biomass energy (生物能).often forgotten as a promising alternative (替代物) to oil, received its day in the sun with the gathering of the Bio-Energy World Congress and Exposition in Atlanta, Georgia, late in April, 1990. Nearly 1, 700 scien­tists, businessmen, and policy-makers, one-quarter from the foreign nations, gathered for a week to discuss various means of squeezing usable energy out of trees, crops, manure, sea­weed, algae, and urban waste. Biomass in the United States contributes 2. 5 percent of the total supply, but this amount can be doubled by 2000 and then doubled again by the year 2010.

Eight percent of Sweden’s energy supply, for example, is presently coming from wood bark and pulp remainings, Sweden intends to raise this percentage by more intensive harvesting of waste food lying around in forests, and through the planting of so-called energy forests of fast-growing trees such as willow and birch.

Brazil is frequently pointed to as a nation with a major successful investment (投资)in energy coming from grains: it presently runs 330,000 automobiles on a water and alcohol (酒精) mixture, replacing 10 percent of its previous oil sup­ply. Brazilian representatives (代表) at the conference said they wish to double this in five years, with a final goal of total replacement. Most of the cars are built at the factory to use the mixture, while older models are changed through low-cost gov­ernment programs.

4. In Line 2, the phrase received its day in the sun most probably means ________.

A. came to the public mind                    B. had its turn in the sunlight

C. was regarded as a solar energy                  D. came from the energy of the sun

5. Which of the following statements is supported by the passage?

A. 1, 700 scientists attended the conference.

B. A quarter of American businessmen were present at the conference.

C. Foreign policy-makers accounted for a quarter.

D. Three-quarters of the representatives were from the U. S.

6. Of the total supply in 2010, biomass in the U. S. will be________.

A. 5%              B.20%              C.10%              D.15%

7. Which of the following is not regarded as biomass energy?

A. Willow and seaweed.                     B. Wood and grains.

C. Water and alcohol mixture.              D. Crops and oil mixture.

8. A suitable title for this passage would be ________.

A. An Energy Conference                    B. Approval of Biomass Energy

C. Bio-Energy for Automobiles       D. Keys to Energy Crisis