Given table T1 has column I1 containing the following data: I1 1 2 3 4 If the following sequence of SQL statements is applied within a single unit of work: UPDATE t1 SET i1 = 3 WHERE i1 = 2; S AVEPOINT s1 ON ROLLBACK RETAIN CURSORS; UPDATE t1 SET i1 = 5 WHERE i1 = 3; SAVEPOINT s2 ON ROLLBACK RETAIN CURSORS;INSERT INTO t1 (i1) VALUES (6); ROLLBACK TO SAVEPOINT s1; UPDATE t1 SET i1 = 2 WHERE i1 = 4; COMMIT; What is the expected sequence of values returned from?() SELECT i1 FROM t1 ORDER BY i1A、1, 2, 3, 3B、1, 2, 2, 4C、1, 2, 3, 3, 6D、1, 2, 2, 5, 6

Given table T1 has column I1 containing the following data: I1 1 2 3 4 If the following sequence of SQL statements is applied within a single unit of work: UPDATE t1 SET i1 = 3 WHERE i1 = 2; S AVEPOINT s1 ON ROLLBACK RETAIN CURSORS; UPDATE t1 SET i1 = 5 WHERE i1 = 3; SAVEPOINT s2 ON ROLLBACK RETAIN CURSORS;INSERT INTO t1 (i1) VALUES (6); ROLLBACK TO SAVEPOINT s1; UPDATE t1 SET i1 = 2 WHERE i1 = 4; COMMIT; What is the expected sequence of values returned from?() SELECT i1 FROM t1 ORDER BY i1

  • A、1, 2, 3, 3
  • B、1, 2, 2, 4
  • C、1, 2, 3, 3, 6
  • D、1, 2, 2, 5, 6

相关考题:

The EMPLOYEES table has these columns:LAST NAME VARCHAR2(35)SALARY NUMBER(8,2)HIRE_DATE DATEManagement wants to add a default value to the SALARY column. You plan to alter the table by using this SQL statement:ALTER TABLE EMPLOYEESMODIFY ( SALARY DEFAULT 5000);What is true about your ALTER statement?()A. Column definitions cannot be altered to add DEFAULT values.B. A change to the DEFAULT value affects only subsequent insertions to the table.C. Column definitions cannot be altered at add DEFAULT values for columns with a NUMBER data type.D. All the rows that have a NULL value for the SALARY column will be updated with the value 5000.

The EMPLOYEES table has these columns:Management wants to add a default value to the SALARY column. You plan to alter the table by using this SQL statement:What is true about your ALTER statement?() A. Column definitions cannot be altered to add DEFAULT values.B. A change to the DEFAULT value affects only subsequent insertions to the table.C. Column definitions cannot be altered at add DEFAULT values for columns with a NUMBER data type.D. All the rows that have a NULL value for the SALARY column will be updated with the value 5000.

Which of the following scenarios will ensure that the value of the NEXT_STEPNO column in a given row of table TABLEX exists as a value of column STEPNO (usually in another row) in the same table?() A.Define a UNIQUE constraint on the columns NEXT_STEPNO and STEPNO.B.Define a CHECK constraint on the NEXT_STEPNO column (NEXT_STEPNO = STEPNO).C.Define column STEPNO as the primary key of TABLEX and column NEXT_STEPNO as a foreign key referencing column STEPNO of the same table.D.Define column NEXT_STEPNO as the primary key of TABLEX and column STEPNO as a foreign key referencing column NEXT_STEPNO in the same table.

When defining a referential constraint between the parent table T2 and the dependent table T1, which of the following is true?() A.The list of column names in the FOREIGN KEY clause can be a subset of the list of column names in the primary key of T2 or a UNIQUE constraint that exists on T2.B.The list of column names in the FOREIGN KEY clause can be a subset of the list of column names in the primary key of T1 or a UNIQUE constraint that exists on T1.C.The list of column names in the FOREIGN KEY clause must be identical to the list of column names in the primary key of T2 or a UNIQUE constraint that exists on T2.D.The list of column names in the FOREIGN KEY clause must be identical to the list of column names in the primary key of T1 or a UNIQUE constraint that exists on T1.

In which of the following situations should correlation names be used?() A.A table referenced in the FROM clause has no indexed column.B.The table referenced in the FROM clause has more than 200 columns.C.Two or more tables in the FROM clause have identical column names.D.The FROM clause contains two or more tables in the SELECT statement.

Which of the following can be used to ensure that once a row has been inserted in table TABLEX, the column MAINID in that row cannot be updated?() A.Define the column MAINID as NOT UPDATABLEB.Define the column MAINID as a PRIMARY KEYC.Define the column MAINID as a FOREIGN KEYD.Define an UPDATE trigger on table TABLEX

Given the following requirements:Create a table named TESTTAB, which has an identity column named ACTIVITYNO. Define the identity column to generate the values for the column by default. Start the values at 10 and increment by 10. Make the identity column unique. Which of the following CREATE statements will successfully create this table?()A.CREATE TABLE TESTTAB (ACTIVITYNO SMALLINT NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 10 INCREMENT BY 10), ACTKWD CHAR(6) NOT NULL, ACTDESC VARCHAR(20) NOT NULL, UNIQUE(ACTIVITYNO))B.CREATE TABLE TESTTAB (ACTIVITYNO SMALLINT NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 1 INCREMENT BY 10), ACTKWD CHAR(6) NOT NULL, ACTDESC VARCHAR(20) NOT NULL, UNIQUE(ACTNO))C.CREATE TABLE TESTTAB (ACTIVITYNO SMALLINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 10 INCREMENT BY 1), ACTKWD CHAR(6) NOT NULL, ACTDESC VARCHAR(20) NOT NULL, UNIQUE(ACTIVITYNO))D.CREATE TABLE TESTTAB (ACTIVITYNO SMALLINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 10 INCREMENT BY 10), ACTKWD CHAR(6) NOT NULL, ACTDESC VARCHAR(20) NOT NULL, UNIQUE(ACTIVITYNO))

What type of constraint can be used to ensure that, in any given row in a table, the value of one column never exceeds the value of another column?() A.CheckB.RangeC.ReferentialD.Informational

利用SQL命令删除“学生”表中的“年龄”字段,正确的命令格式是( )。A)ALTER TABLE 学生 DELETE COLUMN 年龄B)ALTER TABLE 学生 DROP COLUMN 年龄C)ALTER TABLE 学生 CANCEL COLUMN 年龄D)ALTER TABLE 学生 CUT COLUMN 年龄

In which situations does the Oracle Data Pump use external tables and not the direct path load whileexporting a table()A、if a table is not in a clusterB、if a table has an active triggerC、if a table has an encryptedD、if a table has a column of data type LONG defined on itE、if a table has a referential integrity constraint defined on it

You need to change the definition of an existing table. The COMMERCIALS table needs its DESCRIPTION column changed to hold varying length characters up to 1000 bytes. The column can currently hold 500 bytes per value. The table contains 20000 rows. Which statement is valid?()A、ALTER TABLE commercials MODIFY (description CHAR2(1000));B、ALTER TABLE commercials CHANGE (description CHAR2(1000));C、ALTER TABLE commercials CHANGE (description VARCHAR2(1000));D、ALTER TABLE commercials MODIFY (description VARCHAR2(1000));E、You cannot increase the size of a column if the table has rows.

What type of constraint is used to ensure that each row inserted into the EMPLOYEE table with a value in the WORKDEPT column has a row with a corresponding value in the DEPTNO column of the DEPARTMENT table?()A、A check constraint on the EMPLOYEE tableB、A unique constraint on the EMPLOYEE table WORKDEPT columnC、A foreign key reference from the DEPARTMENT tables DEPTNO column to the WORKDEPT column of the EMPLOYEE tableD、A foreign key reference from the EMPLOYEE tables WORKDEPT column to the DEPTNO column of the DEPARTMENT table

Which of the following can be used to ensure that once a row has been inserted in table TABLEX, the column MAINID in that row cannot be updated?()A、Define the column MAINID as NOT UPDATABLEB、Define the column MAINID as a PRIMARY KEYC、Define the column MAINID as a FOREIGN KEYD、Define an UPDATE trigger on table TABLEX

单选题Given table T1 has column I1 containing the following data: I1 1 2 3 4 If the following sequence of SQL statements is applied within a single unit of work: UPDATE t1 SET i1 = 3 WHERE i1 = 2; S AVEPOINT s1 ON ROLLBACK RETAIN CURSORS; UPDATE t1 SET i1 = 5 WHERE i1 = 3; SAVEPOINT s2 ON ROLLBACK RETAIN CURSORS;INSERT INTO t1 (i1) VALUES (6); ROLLBACK TO SAVEPOINT s1; UPDATE t1 SET i1 = 2 WHERE i1 = 4; COMMIT; What is the expected sequence of values returned from?() SELECT i1 FROM t1 ORDER BY i1A1, 2, 3, 3B1, 2, 2, 4C1, 2, 3, 3, 6D1, 2, 2, 5, 6

单选题You work in a company which uses SQL Server 2008. You are the administrator of the company database. Now you are in charge of a SQL Server 2008 instance. There is a database named named Dworks in the instance. The Dworks table has a table named BillDetails which has a clustered primary key named BillId on the BillId column. The BillDetails table has a single XML column named GoodsDetails. The XML column has an XML index and XML data are stored in this XML column. A new column named GoodsID is added to the BillDetails table. GoodsID must be included in the primary key.  So what action should you perform to achieve this goal?()AYou should drop the XML index on the table. Modify the primary key. Recreate the XML index BYou should alter the XML index and set the ALLOW_ROW_LOCKS = OFF option. Alter the primary key and set the ALLOW_ROW_LOCKS = ON option. CYou should move the XML data to a temporary table. Clear the XML data from the original table by setting the GoodsDetails column to NULL. Modify the primary key. Repopulate the ProductSpecs column. DYou should disable the XML index on the GoodsDetails column. Modify the primary key.Enable the XML index on the ProductSpecs column.

单选题Given the following requirements:Create a table named TESTTAB, which has an identity column named ACTIVITYNO. Define the identity column to generate the values for the column by default. Start the values at 10 and increment by 10. Make the identity column unique. Which of the following CREATE statements will successfully create this table?()ACREATE TABLE TESTTAB (ACTIVITYNO SMALLINT NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 10 INCREMENT BY 10), ACTKWD CHAR(6) NOT NULL, ACTDESC VARCHAR(20) NOT NULL, UNIQUE(ACTIVITYNO))BCREATE TABLE TESTTAB (ACTIVITYNO SMALLINT NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 1 INCREMENT BY 10), ACTKWD CHAR(6) NOT NULL, ACTDESC VARCHAR(20) NOT NULL, UNIQUE(ACTNO))CCREATE TABLE TESTTAB (ACTIVITYNO SMALLINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 10 INCREMENT BY 1), ACTKWD CHAR(6) NOT NULL, ACTDESC VARCHAR(20) NOT NULL, UNIQUE(ACTIVITYNO))DCREATE TABLE TESTTAB (ACTIVITYNO SMALLINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 10 INCREMENT BY 10), ACTKWD CHAR(6) NOT NULL, ACTDESC VARCHAR(20) NOT NULL, UNIQUE(ACTIVITYNO))

单选题You need to change the definition of an existing table. The COMMERCIALS table needs its DESCRIPTION column changed to hold varying length characters up to 2000 bytes. The column can currently hold 1000 bytes per value. The table contains 20000 rows. Which statement is valid?()AALTER TABLE commercials MODIFY (description CHAR2(2000));BALTER TABLE commercials CHANGE (description CHAR2(2000));CALTER TABLE commercials CHANGE (description VARCHAR2 (2000));DALTER TABLE commercials MODIFY (description VARCHAR2 (2000));EYou cannot increase the size of a column if the table has rows.

单选题Assuming PUBLIC has been granted all privileges on table T1, which of the following statements would continue to permit any user to add rows to table T1, but not remove them?()AREVOKE DROP ON t1 FROM PUBLICBREVOKE UPDATE ON t1 FROM PUBLICCREVOKE DELETE ON t1 FROM PUBLICDREVOKE CONTROL ON t1 FROM PUBLIC

单选题You are modifying a table named Product in a SQL Server 2005 database. You want to add a new column named FriendlyName to the Product table. A friendly name for each product will be stored in this column. The table currently contains data. The sales department has not yet created a friendly name for each product. FriendlyName is a required value for each product. You want to add this new column by using the least amount of effort. What should you do?()ADefine the new column as NULL.Update the FriendlyName column to the same value as the productName column. Alter the FriendlyName column to be NOT NULL.BDefine the new column as NOT NULL with a default value of ’Undefined.’CDefine the new column as NULL. Use application logic to enforce the data constraint.DDefine the new column as NULL with a default value of ’Undefined.’

多选题In which situations does the Oracle Data Pump use external tables and not the direct path load whileexporting a table()Aif a table is not in a clusterBif a table has an active triggerCif a table has an encryptedDif a table has a column of data type LONG defined on itEif a table has a referential integrity constraint defined on it

单选题The ST_INFO master table has millions of rows that are updated very rarely. It has a STATE_CODE column that contains the value for 25 states. The table is frequently queried on the STATE_CODE column.  Which type of index would you suggest to improve the query performance?()AB­treeBbitmapCreverse keyDfunction based

单选题When defining a referential constraint between the parent table T2 and the dependent table T1, which of the following is true?()AThe list of column names in the FOREIGN KEY clause can be a subset of the list of column names in the primary key of T2 or a UNIQUE constraint that exists on T2.BThe list of column names in the FOREIGN KEY clause can be a subset of the list of column names in the primary key of T1 or a UNIQUE constraint that exists on T1.CThe list of column names in the FOREIGN KEY clause must be identical to the list of column names in the primary key of T2 or a UNIQUE constraint that exists on T2.DThe list of column names in the FOREIGN KEY clause must be identical to the list of column names in the primary key of T1 or a UNIQUE constraint that exists on T1.

单选题What type of constraint can be used to ensure that, in any given row in a table, the value of one column never exceeds the value of another column?()ACheckBRangeCReferentialDInformational

单选题In which of the following situations should correlation names be used?()AA table referenced in the FROM clause has no indexed column.BThe table referenced in the FROM clause has more than 200 columns.CTwo or more tables in the FROM clause have identical column names.DThe FROM clause contains two or more tables in the SELECT statement.

单选题Which of the following scenarios will ensure that the value of the NEXT_STEPNO column in a given row of table TABLEX exists as a value of column STEPNO (usually in another row) in the same table?()ADefine a UNIQUE constraint on the columns NEXT_STEPNO and STEPNO.BDefine a CHECK constraint on the NEXT_STEPNO column (NEXT_STEPNO = STEPNO).CDefine column STEPNO as the primary key of TABLEX and column NEXT_STEPNO as a foreign key referencing column STEPNO of the same table.DDefine column NEXT_STEPNO as the primary key of TABLEX and column STEPNO as a foreign key referencing column NEXT_STEPNO in the same table.

单选题What type of constraint is used to ensure that each row inserted into the EMPLOYEE table with a value in the WORKDEPT column has a row with a corresponding value in the DEPTNO column of the DEPARTMENT table?()AA check constraint on the EMPLOYEE tableBA unique constraint on the EMPLOYEE table WORKDEPT columnCA foreign key reference from the DEPARTMENT tables DEPTNO column to the WORKDEPT column of the EMPLOYEE tableDA foreign key reference from the EMPLOYEE tables WORKDEPT column to the DEPTNO column of the DEPARTMENT table

单选题Given table T1 has column I1 containing the following data: I1 1 2 3 4 If the following sequence of SQL statements is applied within a single unit of work: UPDATE t1 SET i1 = 3 WHERE i1 = 2; S AVEPOINT s1 ON ROLLBACK RETAIN CURSORS; UPDATE t1 SET i1 = 5 WHERE i1 = 3; SAVEPOINT s2 ON ROLLBACK RETAIN CURSORS;INSERT INTO t1 (i1) VALUES (6); ROLLBACK TO SAVEPOINT s1; UPDATE t1 SET i1 = 2 WHERE i1 = 4; COMMIT; What is the expected sequence of values returned from?() SELECT i1 FROM t1 ORDER BY i1A1, 2, 3, 3B1, 2, 2, 4C1, 2, 3, 3, 6D1, 2, 2, 5, 6