一、原题
Which statements are correct regarding indexes? (Choose all that apply.)
A. When a table is dropped, the corresponding indexes are automatically dropped.
B. A FOREIGN KEY constraint on a column in a table automatically creates a nonunique index.
C. A nondeferrable PRIMARY KEY or UNIQUE KEY constraint in a table automatically creates a unique index.
D. For each data manipulation language (DML) operation performed, the corresponding indexes are automatically updated.
答案:ACD
二、题目翻译A. When a table is dropped, the corresponding indexes are automatically dropped.
B. A FOREIGN KEY constraint on a column in a table automatically creates a nonunique index.
C. A nondeferrable PRIMARY KEY or UNIQUE KEY constraint in a table automatically creates a unique index.
D. For each data manipulation language (DML) operation performed, the corresponding indexes are automatically updated.
答案:ACD
关于索引哪句话是正确的?(选择所有正确的项)
A. 当表被删除后,对应的索引也自动删除。
B. 表中列上的外键约束自动创始一个非唯一索引。
C. 表中的非延迟PRIMARY KEY或者UNIQUE KEY约束自动创建一个唯一索引。
D. 对于执行的每一个DML操作,对应的索引也自动更新。
三、题目解析A. 当表被删除后,对应的索引也自动删除。
B. 表中列上的外键约束自动创始一个非唯一索引。
C. 表中的非延迟PRIMARY KEY或者UNIQUE KEY约束自动创建一个唯一索引。
D. 对于执行的每一个DML操作,对应的索引也自动更新。
PRIMARY KEY和UNIQUE KEY约束自动创建一个唯一索引,而FOREIGN KEY和NOT NULL、CHECK约束都不会自动创建索引。