Given table T1 has column I1 co

题目

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
如果没有搜索结果或未解决您的问题,请直接 联系老师 获取答案。
相似问题和答案

第1题:

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.


参考答案:C

第2题:

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.


参考答案:C

第3题:

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.


参考答案:B

第4题:

利用SQL命令删除“学生”表中的“年龄”字段,正确的命令格式是( )。

A)ALTER TABLE 学生 DELETE COLUMN 年龄

B)ALTER TABLE 学生 DROP COLUMN 年龄

C)ALTER TABLE 学生 CANCEL COLUMN 年龄

D)ALTER TABLE 学生 CUT COLUMN 年龄


正确答案:B
从表中删除指定字段的SQL命令是:
ALTER TABLE表名DROP[COLUMN]字段名,其中,COLUMN可以省略。

第5题:

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))


参考答案:D

第6题:

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.


参考答案:C

第7题:

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 UPDATABLE

B.Define the column MAINID as a PRIMARY KEY

C.Define the column MAINID as a FOREIGN KEY

D.Define an UPDATE trigger on table TABLEX


参考答案:D

第8题:

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.


参考答案:B

第9题:

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.Check

B.Range

C.Referential

D.Informational


参考答案:A

第10题:

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 cluster
  • B、if a table has an active trigger
  • C、if a table has an encrypted
  • D、if a table has a column of data type LONG defined on it
  • E、if a table has a referential integrity constraint defined on it

正确答案:B,C,E

更多相关问题