单选题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

题目
单选题
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.

如果没有搜索结果或未解决您的问题,请直接 联系老师 获取答案。
相似问题和答案

第1题:

Examine the following commands for redefining a table with Virtual Private Database (VPD) policies:Which two statements are true about redefining the table?()

A. All the triggers for the table are disabled without changing any of the column names or column types in the table.

B. The primary key constraint on the EMPLOYEES table is disabled during redefinition.

C. VPD policies are copied from the original table to the new table during online redefinition.

D. You must copy the VPD policies manually from the original table to the new table during online redefinition.


参考答案:B, C

第2题:

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

第3题:

You need to modify the STUDENTS table to add a primary key on the STUDENT_ID column. The table is currently empty. Which statement accomplishes this task?()

A. ALTER TABLE students ADD PRIMARY KEY _ id;

B. ALTER TABLE students ADD CONSTRAINT PRIMARY KEY (student_id);

C. ALTER TABLE students ADD CONSTRAINT stud_id_pk PRIMARY KEY student_id;

D. ALTER TABLE students ADD CONSTRAINT stud_id_pk PRIMARY KEY (student_id);

E. ALTER TABLE students MODIFY CONSTRAINT stud_id_pk PRIMARY KEY (student_id);


参考答案:D

第4题:

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

第5题:

Click the Exhibit button and examine the data in the EMPLOYEES table.On the EMPLOYEES table, EMPLOYEE_ID is the primary key. MGR_ID is the ID of managers and refers to the EMPLOYEE_ID. The JOB_ID column is a NOT NULL column.Evaluate this DELETE statement:DELETE employee_id, salary, job_idFROM employeesWHERE dept_id = 90;Why does the DELETE statement fail when you execute it?()

A.There is no row with dept_id 90 in the EMPLOYEES table.

B.You cannot delete the JOB_ID column because it is a NOT NULL column.

C.You cannot specify column names in the DELETE clause of the DELETE statement.

D.You cannot delete the EMPLOYEE_ID column because it is the primary key of the table.


参考答案:C

第6题:

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 table

B.A unique constraint on the EMPLOYEE table WORKDEPT column

C.A foreign key reference from the DEPARTMENT tables DEPTNO column to the WORKDEPT column of the EMPLOYEE table

D.A foreign key reference from the EMPLOYEE tables WORKDEPT column to the DEPTNO column of the DEPARTMENT table


参考答案:D

第7题:

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

第8题:

Examine the data in the EMPLOYEES table.On the EMPLOYEES table, EMPLOYEE_ID is the primary key. MGR_ID is the ID of managers and refers to the EMPLOYEE_ID. The JOB_ID column is a NOT NULL column.Evaluate this DELETE statement:Why does the DELETE statement fail when you execute it?()

A. There is no row with dept_id 90 in the EMPLOYEES table.

B. You cannot delete the JOB_ID column because it is a NOT NULL column.

C. You cannot specify column names in the DELETE clause of the DELETE statement.

D. You cannot delete the EMPLOYEE_ID column because it is the primary key of the table.


参考答案:C

第9题:

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

第10题:

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 table
  • B、A unique constraint on the EMPLOYEE table WORKDEPT column
  • C、A foreign key reference from the DEPARTMENT tables DEPTNO column to the WORKDEPT column of the EMPLOYEE table
  • D、A foreign key reference from the EMPLOYEE tables WORKDEPT column to the DEPTNO column of the DEPARTMENT table

正确答案:D

更多相关问题