问题 单项选择题

(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.CREATEVIEW VigWl 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短语的功能是对记录进行分组。

阅读理解

阅读短文,根据短文内容,从从A、B、C、D四个选项中,选出最佳答案.

Australia is the largest island in the world. It is a little smaller than China. It is in the south of the earth. Australia is big, but its population is small. The population of Australia is nearly as large as that of Shanghai.

Enough laws (法律) have been made to fight against pollution. The cities in Australia have got little air or water pollution. The sky is blue and the water is clean. You can clearly see fish swimming in the rivers. Plants grow very well.

Last month we visited Perth,  the biggest city in Western Australia, and went to a wild flowers' exhibi­tion (展览). There we saw a large number of wild flow­ers we had never seen before. We had a wonderful time. Perth is famous for its beautiful wild flowers. In spring every year Perth has the wild flowers' exhibi­tion. After visiting Perth, we spent a day in the coun­tryside. We sat down and had a rest near a path at the foot of a hill. It was quiet and we enjoyed ourselves. Suddenly we heard bells ringing at the top of the hill. What we saw made us pick up all our things and run back to the car as quickly as we could. There were about three hundred sheep coming towards us down the path.

Australia is famous for its sheep and kangaroos. After a short drive from any town,  you will find your­self in the middle of white sheep. Sheep, sheep, every­where are sheep.

小题1:Australia is        .

A.the largest country in the world

B. larger than China

C.as large as Shanghai

D.not so large as China小题2:Enough laws have been made to        .

A.increase the population

B.grow more plants

C.fight against pollution

D.show wild flowers小题3:Perth is        .

A. the capital of Australia

B. in the west of Australia

C. in the east of Australia

D. the biggest city in Australia小题4:In Perth you may visit a wild flowers' exhi­bition in        .

A.October

B.January

C.May

D.July小题5:Which of the following sentences is TRUE?

A.All the big cities in Australia are serious­ly polluted.

B.Australia is famous for its sheep, kanga­roos and large population.

C.We ran back to the car because we were in the middle of the white sheep.

D.If you go to the countryside in Australia, you will see a large number of white sheep.

单项选择题