Which statement explicitly names a constraint?()

题目
单选题
Which statement explicitly names a constraint?()
A

ALTER TABLE student_grades   ADD   FOREIGN KEY (student_id) REFERENCES students(student_id);

B

ALTER TABLE student_grades   ADD CONSTRAINT NAME = student_id_fk   FOREIGN KEY (student_id) REFERENCES students(student_id);

C

ALTER TABLE student_grades   ADD CONSTRAINT student_id_fk   FOREIGN KEY (student_id) REFERENCES students(student_id);

D

ALTER TABLE student grades   ADD NAMED CONSTRAINT student_id_fk   FOREIGN KEY (student_id) REFERENCES students(student_id);

E

ALTER TABLE student grades   ADD NAME student_id_fk   FOREIGN KEY (student_id) REFERENCES students(student_id);

参考答案和解析
正确答案: A
解析: 暂无解析
如果没有搜索结果或未解决您的问题,请直接 联系老师 获取答案。
相似问题和答案

第1题:

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

第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题:

Which statement adds a constraint that ensures the CUSTOMER_NAME column of the CUSTOMERS table holds a value?()

A. ALTER TABLE customers ADD CONSTRAINT cust_name_nn CHECK customer_name IS NOT NULL;

B. ALTER TABLE customers MODIFY CONSTRAINT cust_name_nn CHECK customer_name IS NOT NULL;

C. ALTER TABLE customers MODIFY customer_name CONSTRAINT cust_name_nn NOT NULL;

D. ALTER TABLE customers MODIFY customer_name CONSTRAINT cust_name_nn IS NOT NULL;

E. ALTER TABLE customers MODIFY name CONSTRAINT cust_name_nn NOT NULL;

F. ALTER TABLE customers ADD CONSTRAINT cust_name_nn CHECK customer_name NOT NULL;


参考答案:C

第4题:

Which two statements are true regarding the ORDER BY clause? ()

  • A、It is executed first in the query execution 
  • B、It must be the last clause in the SELECT statement 
  • C、It cannot be used in a SELECT statement containing a HAVING clause
  • D、You cannot specify a column name followed by an expression in this clause 
  • E、You can specify a combination of numeric positions and column names in this clause

正确答案:B,E

第5题:

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.

正确答案:B

第6题:

Which of the following is true of an index used to support a UNIQUE constraint?()

A.It must have the UNIQUE attribute.

B.It cannot be created explicitly by the user.

C.It must have the UNIQUE and CLUSTER attributes.

D.It must have the UNIQUE WHERE NOT NULL attribute.


参考答案:A

第7题:

Which two statements about views are true? ()

  • A、A view can be created as read only.
  • B、A view can be created as a join on two or more tables.
  • C、A view cannot have an ORDER BY clause in the SELECT statement.
  • D、A view cannot be created with a GROUP BY clause in the SELECT statement.
  • E、A view must have aliases defined for the column names in the SELECT statement.

正确答案:A,B

第8题:

Which statement explicitly names a constraint? ()

A. ALTER TABLE student_grades ADD FOREIGN KEY (student_id) REFERENCES students (student_id);

B. ALTER TABLE student_grades ADD CONSTRAINT NAME = student_id_fk FOREIGN KEY (student_id) REFERENCES students (student_id);

C. ALTER TABLE student_grades ADD CONSTRAINT student_id_fk FOREIGN KEY (student_id) REFERENCES students (student_id);

D. ALTER TABLE student grades ADD NAMED CONSTRAINT student_id_fk FOREIGN KEY (student_id) REFERENCES students (student_id);

E. ALTER TABLE student grades ADD NAME student_id_fk FOREIGN KEY (student_id) REFERENCES students (student_id);


参考答案:C

第9题:

View the Exhibit to observe the roles assigned to the SL_REP user.  Which statement is true about theassignment of the SELECT_CATALOG_ROLE role to the SL_REP user()

  • A、The user must enable the role explicitly.
  • B、The user can grant the role to other users.
  • C、The user cannot use the role until the DBA enables it explicitly.
  • D、The user can start using the role immediately without any changes

正确答案:A

第10题:

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 student_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 MODIFY CONSTRAINT stud _ id _pk PRIMARY KEY (student _ id);

正确答案:C

更多相关问题