单选题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 and C2 together, which statement(s) will create index(es) that will provide optimal query performance? ()A CREATE UNIQUE INDEX xtab1 ON tab1 (c1) include (c2)B CREATE UNIQUE INDEX xtab1 ON tab1 (c1);  CREATE INDEX xtab2 ON tab1 (c3) INCLUDE (c2) C CREATE UNIQUE INDEX xtab1 ON tab1 (c2, c1)D CREATE UNIQUE INDEX xtab1 ON tab1 (c2) INCLUDE (c1)

单选题
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 and C2 together, which statement(s) will create index(es) that will provide optimal query performance? ()
A

 CREATE UNIQUE INDEX xtab1 ON tab1 (c1) include (c2)

B

 CREATE UNIQUE INDEX xtab1 ON tab1 (c1);  CREATE INDEX xtab2 ON tab1 (c3) INCLUDE (c2) 

C

 CREATE UNIQUE INDEX xtab1 ON tab1 (c2, c1)

D

 CREATE UNIQUE INDEX xtab1 ON tab1 (c2) INCLUDE (c1)


参考解析

解析: 暂无解析

相关考题:

Which of the following statements is used to grant user TOM and Application team APPGRP the ability to add data to table TAB1?() A.GRANT ADD DATA ON TABLE tab1 TO GROUP tom appgrpB.GRANT INSERT TO USER tom, GROUP appgrp ON TABLE tab1C.GRANT INSERT ON TABLE tab1 TO USER tom, GROUP appgrpD.GRANT ADD DATA ON TABLE tab1 TO USER appgrp, GROUP tom

Given the following statements:CREATE TABLE tab1 (col1 INT); CREATE TABLE tab2 (col1 INT); CREATE TRIGGER trig1 AFTER UPDATE ON tab1 REFERENCING NEW AS new1 FOR EACH ROW MODE DB2SQL INSERT INTO tab2 VALUES(new1.col1); INSERT INTO tab1 VALUES(2),(3);What is the result of the following query? SELECT count(*) FROM tab2;()A.3B.2C.1D.0

你定义了一个对象类型myOBJ,要基于该类型来创建表tab1,语句为()。 A.CREATE TABLE tab1 OF myOBJB.CREATE TABLE myOBJ OF tab1C.CREATE TABLE tab1 AS myOBJD.CREATE TABLE tab1 TYPE OF myOBJ

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)

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 and C2 together, which statement(s) will create index(es) that will provide optimal query performance? ()A、 CREATE UNIQUE INDEX xtab1 ON tab1 (c1) include (c2)B、 CREATE UNIQUE INDEX xtab1 ON tab1 (c1);  CREATE INDEX xtab2 ON tab1 (c3) INCLUDE (c2) C、 CREATE UNIQUE INDEX xtab1 ON tab1 (c2, c1)D、 CREATE UNIQUE INDEX xtab1 ON tab1 (c2) INCLUDE (c1)

A DBA has been asked to create a table which will contain a substantial amount of detailed sales information for each calendar month and maintain it to contain only the last 12 months. Which of the following methods will facilitate the online removal of the oldest month’s data?()A、Create an MQT that selects the oldest month of data with the REFRESH IMMEDIATE option.B、Create 12 separate tables, create a view based on all 12, drop the table with the oldest month's data then drop and re- create the view.C、Create a range partitioned table, partitioned by month, and use the ALTER TABLE statement to detach the oldest month and attach storage for new data.D、Create a single table, extract the data to be retained using UNLOAD with a SELECT statement, drop and re-create the table then load only the data to be retained.

Given the following statements: CREATE TABLE tab1 (col1 INT); CREATE TABLE tab2 (col1 INT); CREATE TRIGGER trig1 AFTER UPDATE ON tab1 REFERENCING NEW AS new1 FOR EACH ROW MODE DB2SQL INSERT INTO tab2 VALUES(new1.col1); INSERT INTO tab1 VALUES(2),(3); What is the result of the following query? SELECT count(*) FROM tab2;()A、3B、2C、1D、0

Evaluate the CREATE TABLE statement:   CREATE TABLE products   (product_id NUMBER (6)  CONSTRAINT prod_id_pk PRIMARY KEY,  product_name VARCHAR2 (15));   Which statement is true regarding the PROD_ID_PK constraint?()A、 It would be created only if a unique index is manually created first.B、 It would be created and would use an automatically created unique index.C、 It would be created and would use an automatically created nonunique index.D、 It would be created and remains in a disabled state because no index is specified in the command.

你定义了一个对象类型myOBJ,要基于该类型来创建表tab1,语句为()。A、CREATE TABLE tab1 OF myOBJB、CREATE TABLE myOBJ OF tab1C、CREATE TABLE tab1 AS myOBJD、CREATE TABLE tab1 TYPE OF myOBJ

Which two operations can be performed on an external table()A、Create a view on the table.B、Create an index on the table.C、Create a synonym on the table.D、Add a virtual column to the table.E、Update the table using the UPDATE statement.F、Delete rows in the table using the DELETE command.

Examine the following steps performed on a database instance: 1. The DBA grants the CREATE TABLE system privilege to the SKD user with ADMIN OPTION. 2. The SKD user creates a table. 3. The SKD user grants the CREATE TABLE system privilege to the HR user. 4. The HR user creates a table. 5. The DBA revokes the CREATE TABLE system privilege from SKD.  Which statement is true after step 5 isperformed()A、The table created by SKD is not accessible and SKD cannot create new tables.B、The tables created by SKD and HR remain, but both cannot create new tables.C、The table created by HR remains and HR still has the CREATE TABLE system privilege.D、The table created by HR remains and HR can grant the CREATE TABLE system privilege to other users.

You issued the following statement:  SQL ALTER DATABASE BACKUP CONTROLFILE TO TRACE;  What will be the result of issuing the statement?()  A、 The control file will be multiplexed.B、 The control file will be recreated.C、The script containing the CREATE CONTROLFILE statement will be created.D、 The binary backup of the control file will be created.

You created the DEPT table by using the following command:   CREATE TABLE scott.dept   (deptno NUMBER(3),   dname VARCHAR2(15),   loc VARCHAR2(15) )   STORAGE (INITIAL 100K NEXT 50K  MAXEXTENTS 10 PCTINCREASE 5  FREELIST GROUPS 6 FREELISTS 4);You are required to shrink the DEPT table. While performing the shrink operation, you want to ensure that the recovered space is returned to the tablespace in which the DEPT table is stored. You do not want to shrink the indexes created on the DEPT table. What will you do to shrink the SCOTT.EMP table?()A、 Issue the ALTER TABLE SCOTT.DEPT SHRINK SPACE COMPACT; statement.B、 Issue the ALTER TABLE SCOTT.DEPT SHRINK SPACE; statement.C、 Issue the ALTER TABLE SCOTT.DEPT SHRINK SPACE CASCADE; statement.D、 You cannot shrink the SCOTT.EMP table.

Which two operations can be performed on an external table()A、Create a view on the table.B、Create an index on the table.C、Create a synonym on the table.D、Add a virtual column to the table.E、Update the table using the UPDATE statement.F、Delete rows in the table using the DELETE command

单选题View the Exhibit and examine the structure of the EMP table. You executed the following command to add a primary key to the EMP table:   ALTER TABLE emp   ADD CONSTRAINT emp_id_pk  PRIMARY KEY (emp_id)   USING INDEX emp_id_idx;   Which statement is true regarding the effect of the command?()A  The PRIMARY KEY is created along with a new index.B  The PRIMARY KEY is created and it would use an existing unique index.C  The PRIMARY KEY would be created in a disabled state because it is using an existing index.D  The statement produces an error because the USING clause is permitted only in the CREATE TABLE command.

单选题You issued the following statement:  SQL ALTER DATABASE BACKUP CONTROLFILE TO TRACE;  What will be the result of issuing the statement?()A The control file will be multiplexed.B The control file will be recreated.CThe script containing the CREATE CONTROLFILE statement will be created.D The binary backup of the control file will be created.

单选题Examine the following steps performed on a database instance:  1:The DBA grants the CREATE TABLE system privilege to the SKD user with ADMIN OPTION.  2:The SKD usercreates a table.  3:The SKD user grants theCREATETABLE system privilege to the HR user.  4:The HR user creates a table.  5:The DBA revokes the CREATE TABLE system privilege from SKD.  Which statement is true after step 5 is performed()AThe table created by SKD isnot accessibleand SKD cannot create new tables.BThe tables created by SKD and HR remain, but both cannot create new tables.CThe table created by HR remains and HR still has the CREATE TABLE system privilege.DThe table created by HR remains and HR can grant the CREATE TABLE system privilege to other users.

单选题View the Exhibit and examine the structure of the ORDERS and ORDERJTEMS tables.  Evaluate the following SQL statement:   SELECT oi.order_id, product_jd, order_date   FROM order_items oi JOIN orders o   USING (order_id);   Which statement is true regarding the execution of this SQL statement?()A  The statement would not execute because table aliases are not allowed in the JOIN clause.B  The statement would not execute because the table alias prefix is not used in the USING clause.C  The statement would not execute because all the columns in the SELECT clause are not prefixed with table aliases.D  The statement would not execute because the column part of the USING clause cannot have a qualifier in the SELECT list.

单选题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?()ACREATE UNIQUE INDEX xtab1 ON tab1 (c1); CREATE INDEX xtab2 ON tab1 (c2) INCLUDE (c3)  BCREATE UNIQUE INDEX xtab1 ON tab1 (c1) INCLUDE (c2, c3) CCREATE UNIQUE INDEX xtab1 ON tab1 (c3, c2, c1)  DCREATE UNIQUE INDEX xtab1 ON tab1 (c2) INCLUDE (c1, c3)

单选题Examine the commands executed in the following sequence:  1:SQL CREATE ROLE mgrrole;  2:SQL GRANT create user,select any table,connect,resource TO mgrrole;  3:SQL GRANT select,update ON sh.sales TO mgrrole;  4:SQL CREATE ROLE ceo IDENTIFIED BY boss;  5:SQL GRANT mgrrole,drop any table,create any directory TO ceo;  6:SQL GRANT ceo TO mgrrole;  Which statement is true about the above commands()AThe commands execute successfully.BCommand 6 produces an error because of circular role grant.CCommand 5 produces an error because a role cannot be granted to another role.DCommand 3 produces an error because the MGRROLE role already contains system privileges.EThe table created by HR remains and HR still has the CREATE TABLE system privilege.FThe table created by HR remains and HR can grant the CREATE TABLE system privilege to other users.

单选题The following triggers were defined for table TAB1 in the order shown:CREATE TRIGGER trig_a AFTER UPDATE ON tab1 FOR EACH ROW UPDATE sale_tab SET sale_date = CURRENT DATE; CREATE TRIGGER trig_b AFTER UPDATE ON tab1 FOR EACH STATEMENT UPDATE invoice_tab SET invoice_date = CURRENT DATE; CREATE TRIGGER trig_c AFTER UPDATE ON tab1 FOR EACH ROW UPDATE shipping_tab SET ship_date = CURRENT DATE; CREATE TRIGGER trig_d AFTER UPDATE ON tab1 FOR EACH STATEMENT UPDATE billing_tab SETbilling_date = CURRENT DATE;If an event occurs that causes all of them to activate, which trigger will be activated first?()ATRIG_ABTRIG_BCTRIG_CDTRIG_D

单选题Which of the following statements is used to grant user TOM and Application team APPGRP the ability to add data to table TAB1?()AGRANT ADD DATA ON TABLE tab1 TO GROUP tom appgrpBGRANT INSERT TO USER tom, GROUP appgrp ON TABLE tab1CGRANT INSERT ON TABLE tab1 TO USER tom, GROUP appgrpDGRANT ADD DATA ON TABLE tab1 TO USER appgrp, GROUP tom

单选题A DBA has been asked to create a table which will contain a substantial amount of detailed sales information for each calendar month and maintain it to contain only the last 12 months. Which of the following methods will facilitate the online removal of the oldest month’s data?()ACreate an MQT that selects the oldest month of data with the REFRESH IMMEDIATE option.BCreate 12 separate tables, create a view based on all 12, drop the table with the oldest month's data then drop and re- create the view.CCreate a range partitioned table, partitioned by month, and use the ALTER TABLE statement to detach the oldest month and attach storage for new data.DCreate a single table, extract the data to be retained using UNLOAD with a SELECT statement, drop and re-create the table then load only the data to be retained.

单选题You have created an Oracle 10g database named SALES, which will be used by an application named SalesOrders. Users of the SalesOrders application complain that application response time is slow when they generate reports. The SalesOrders application accesses a table that contains 10 million rows. You decide to create an index on this table using the NOLOGGING option so that the index creation process is completed in the least amount of time. Which of the following is NOT true about an index created with the NOLOGGING option?()A The index can be changed from NOLOGGING to LOGGINGB The index cannot be recovered even in the ARCHIVELOG mode.C The index can only be created if the base table is created with the NOLOGGING option.D The index can be recovered if you perform a backup after the CREATE INDEX statement.

单选题You created the DEPT table by using the following command:   CREATE TABLE scott.dept   (deptno NUMBER(3),   dname VARCHAR2(15),   loc VARCHAR2(15) )   STORAGE (INITIAL 100K NEXT 50K  MAXEXTENTS 10 PCTINCREASE 5  FREELIST GROUPS 6 FREELISTS 4);You are required to shrink the DEPT table. While performing the shrink operation, you want to ensure that the recovered space is returned to the tablespace in which the DEPT table is stored. You do not want to shrink the indexes created on the DEPT table. What will you do to shrink the SCOTT.EMP table?()A Issue the ALTER TABLE SCOTT.DEPT SHRINK SPACE COMPACT; statement.B Issue the ALTER TABLE SCOTT.DEPT SHRINK SPACE; statement.C Issue the ALTER TABLE SCOTT.DEPT SHRINK SPACE CASCADE; statement.D You cannot shrink the SCOTT.EMP table.

单选题Evaluate the CREATE TABLE statement:   CREATE TABLE products   (product_id NUMBER (6)  CONSTRAINT prod_id_pk PRIMARY KEY,  product_name VARCHAR2 (15));   Which statement is true regarding the PROD_ID_PK constraint?()A It would be created only if a unique index is manually created first.B It would be created and would use an automatically created unique index.C It would be created and would use an automatically created nonunique index.D It would be created and remains in a disabled state because no index is specified in the command.

单选题You created the ORDERS table in your database by using the following code:   SQL CREATE TABLE ORDERS (ORDER_DATE TIMESTAMP(0) WITH TIME ZONE);   Then, you inserted data in the ORDERS table and saved it by issuing the following statements:SQL INSERT INTO ORDERS VALUES(’18-AUG-00 10:26:44 PM America/New_York’);   SQL INSERT INTO ORDERS VALUES(’23-AUG-02 12:46:34 PM America/New_York’);   SQL COMMIT;   Next, you issued the following statement to change the time zone for the database:   SQL ALTER DATABASE SET TIME_ZONE=’Europe/London’;   What will be the result of executing the above statement?()A The statement will fail.B The statement will be executed successfully, and the new time zone will be set for the database.C The statement will be executed successfully, but the new time zone will be set for the current session.DThe statement will be executed successfully, but the new time zone will neither be set for the database nor for a specific session.

单选题Examine the following steps performed on a database instance: 1. The DBA grants the CREATE TABLE system privilege to the SKD user with ADMIN OPTION. 2. The SKD user creates a table. 3. The SKD user grants the CREATE TABLE system privilege to the HR user. 4. The HR user creates a table. 5. The DBA revokes the CREATE TABLE system privilege from SKD.  Which statement is true after step 5 isperformed()AThe table created by SKD is not accessible and SKD cannot create new tables.BThe tables created by SKD and HR remain, but both cannot create new tables.CThe table created by HR remains and HR still has the CREATE TABLE system privilege.DThe table created by HR remains and HR can grant the CREATE TABLE system privilege to other users.