问题 单项选择题

第(31)到(35)题中使用3个数据表:学生、课程和成绩,表的结构如下:
“学生”表:学号C(8),姓名C(8),性别C(2),系名(6)
“课程”表:课程编号C(4),课程名称C(12),开课系名C(10)
“成绩”表:学号C(8),课程编号C(4),成绩N(6,2)

为“课程”表中定义“开课系名”字段的默认值为“中文”,正确的命令是( )。

A.ALTER TABLE 课程 ALTER 开课系名SET DEFAULT 中文

B.ALTER TABLE 课程 ALTER 开课系名SET DEFAULT “中文”

C.ALTER TABLE 课程 ALTER 开课系名SET DEFAULT 开课系名=中文

D.ALTER TABLE 课程 ALTER 开课系名SET DEFAULT开课系名=“中文”

答案

参考答案:B

解析: 利用SQL命令可以对基本表的结构进行修改,利用下列命令可以修改表结构、定义有效性规则:
ALTER TABLE<表名>
ALTER[COLUMN]<字段名1>[NULL|NOT NULL]
[SET DEFAULT<表达式>]
[SET CHECK<逻辑表达式>[ERROR<字符型文本信息>]]
[RENAME COLUMN<字段名2> TO <字段名3>]
其中,SET OEFAULT<表达式>可以用来指定字段的默认值,注意表达式值的类型要与字段类型一致。

单项选择题

Now which are the animals really to be pitied in captivity First, those clever beings whose lively urge for activity can find no outlet behind the bars of the cage. This is most conspicuous, even for the uninitiated, in the case of animals which, when living in a free state, are accustomed to roaming about widely. Owing to this frustrated desire, foxes and wolves housed, in many old-fashioned zoos, in cages which are far too small, are among the most pitiable of all caged animals.
Though pinioned swans generally seem happy, under proper care, by hatching and rearing their young without any trouble, at migration time things become different: they repeatedly swim to the lee side of the pond, in order to have the whole extent of its surface at their disposal, trying to take off. Again and again the grand preparations end in a pathetic flutter of their half wings ; a truly sorry picture !
This, however, rarely awakens the pity of the zoo visitor, least of all when such an originally highly intelligent and mentally alert animal has deteriorated, in confinement, into a crazy idiot, a very caricature of its former self. Sentimental old ladies, the fanatical sponsors of the societies for Prevention of Cruelty to Animals, have no compunction in keeping a grey parrot in a relatively small cage or even chained to a perch. Together with the large corvines, the parrots are probably the only birds which suffer from that state of mind, common to prisoners, namely, boredom.

What effect does confinement have on clever animals, according to the text

A.They never stop trying to escape.

B.They lose all their muscles.

C.They become unhygienic.

D.They may go ma

填空题