计算机数据库系统原理

下列关于CREATE UNIQUE INDEX IDX1 ON T(C1,C2)语句作用的说法,正确的是()。A、在C1和C2列上分别建立一个唯一聚集索引B、在C1和C2列上分别建立一个唯一非聚集索引C、在C1和C2列的组合上建立一个唯一聚集索引D、在C1和C2列的组合上建立一个唯一非聚集索引

题目

下列关于CREATE UNIQUE INDEX IDX1 ON T(C1,C2)语句作用的说法,正确的是()。

  • A、在C1和C2列上分别建立一个唯一聚集索引
  • B、在C1和C2列上分别建立一个唯一非聚集索引
  • C、在C1和C2列的组合上建立一个唯一聚集索引
  • D、在C1和C2列的组合上建立一个唯一非聚集索引
参考答案和解析
正确答案:D
如果没有搜索结果,请直接 联系老师 获取答案。
相似问题和答案

第1题:

下面所列条目中,( )不是标准的SQL语句。A.DELETE INDEX B.CREATE INDEXC.DELETE FROM D.CREATE UNIQUE CLUSTER INDEX


正确答案:A
删除索引的标准语句应为:DROP DELETE.

第2题:

在表S中对学号SN按升序建立名为SNINDEX的索引,正确的是______。

A.CREATE INDEX SNINDEX WITH S(SN)

B.CREATE UNIQUE INDEX SNINDEX ON S(SN)

C.CREATE SNNIDEX ON S(SN)

D.CREATE SNINDEX INDEX ON S(SN)


正确答案:B
解析:创建索引的基本格式:create index索引表> on 表名> (列名>asc|desc})
  题目中,UNIQUE说明此索引不允许有重复的键值,默认值是NONUNIQUE。

第3题:

根据SQL标准,要创建唯一索引该使用下面哪种语句?()

A CREATE UNIQUE INDEX

B CREATE CLUSTER INDEX

C CREATE ONLY INDEX

D CREATE PRIMARY INDEX


参考答案A

第4题:

Table TAB1 was created using the following statement: CREATE TABLE tab1 (c1 INT, c2 INT, c3 INT, c4 INT, c5 INT); If column C1 is unique and queries typically access columns C1, C2 and C3 together, which statement(s) will createindex(es) that will provide optimal query performance?()

  • A、CREATE UNIQUE INDEX xtab1 ON tab1 (c1); CREATE INDEX xtab2 ON tab1 (c2) INCLUDE (c3)  
  • B、CREATE UNIQUE INDEX xtab1 ON tab1 (c1) INCLUDE (c2, c3) 
  • C、CREATE UNIQUE INDEX xtab1 ON tab1 (c3, c2, c1)  
  • D、CREATE UNIQUE INDEX xtab1 ON tab1 (c2) INCLUDE (c1, c3)

正确答案:B

第5题:

在SQL Server 2008中,设有商品表(商品号,商品名,生产日期,单价,类别)。现经常需要执行下列查询: SELECT 商品号, 商品名, 单价 FROM 商品表 WHERE 类别 IN (′食品′,′家电′) ORDER BY 商品号 现需要在商品表上建立合适的索引来提高该查询的执行效率。下列建立索引的语句,最合适的是( )。

A.CREATE INDEX Idx1 ON 商品表(类别)

B.CREATE INDEX Idx1 ON 商品表(商品号,商品名,单价)

C.CREATE INDEX Idx1 ON 商品表(类别,商品号,INCLUDE (商品名,单价)

D.CREATE INDEX Idx1 ON 商品表(商品号,INCLUDE (商品名,单价,WHERE 类别 = '食品' OR 类别 = '家电'


正确答案:D

第6题:

Given the following DDL for the PARTS table:CREATE TABLE parts (part_no INT(9) NOT NULL, part_name VARCHAR(24), part_remain INT(9));All part numbers entered will be different and all rows should be displayed in order of increasing part numbers whenever the table is queried. Which of the following create index statements will meet this criteria and require the least amount of storage for the index object?()

A.CREATE UNIQUE INDEX idx_partno ON parts(part_no)

B.CREATE UNIQUE INDEX idx_partno ON parts(part_name ASC)

C.CREATE UNIQUE INDEX idx_partno ON parts(part_name, part_no ASC)

D.CREATE UNIQUE INDEX idx_partno ON parts(part_no, part_name ASC)


参考答案:A

第7题:

在Oracle中,你需要创建索引提高薪水审查的性能,该审查要对员工薪水提高12个百分点后进行分析处理,下面哪个createindex命令能解决此问题()。

A.CREATE INDEX my_idx_1 ON employee(salary*1.12)

B.CREATE UNIQUE INDEX my_idx_1 ON employee(salary)

C.CREATE BITMAP INDEX my_idx_1 ON employee(salary)

D.CREATE INDEX my_idx_1 ON employee(salary)REVERSE


参考答案:A

第8题:

在SQL Server 2000的某用户数据库中,设有T表,现要在T表的c1列和c2列上建立一个复合唯一聚集索引,其中c1列值重复率为20%,c2列为10%。请补全下列语句建立一个性能最优的索引:CREATE UNIQUE CLUSTERED INDEX Idx1 ON T(______)


正确答案:C2
C2

第9题:

创建索引的语法是什么()

  • A、CREATE INDEX索引名ON表名(列名)
  • B、CREATE INDEX ON表名(列名)
  • C、CREATE索引名INDEX ON表名.列名
  • D、CREATE OR REPLACE INDEX索引名ON表名(列名)

正确答案:A

第10题:

Examine the command that is used to create a table: SQL> CREATE TABLE orders(oid NUMBER(6) PRIMARY KEY, odate DATE, ccode NUMBER (6), oamtNUMBER(10,2)) TABLESPACE users; Which two statements are true about the effect of the above command()

  • A、A CHECK constraint is created on the OID column.
  • B、A NOT NULL constraint is created on the OID column.
  • C、The ORDERS table is the only object created in the USERS tablespace.
  • D、The ORDERS table and a unique index are created in the USERS tablespace.
  • E、The ORDERS table is created in the USERS tablespace and a unique index is created on the OID columnin the SYSTEM tablespace.

正确答案:B,D

更多相关问题