nerdexam
Oracle

1Z0-061 · Question #82

You need to design a student registration database that contains several tables storing academic information. The STUDENTS table stores information about a student. The STUDENT_GRADES table stores…

The correct answer is D. CREATE TABLE student_grades(student_id NUMBER(12), semester_end DATE, gpa. CONSTRAINT name FOREIGN KEY (column_name) REFERENCES table_name

Using DDL Statements to Create and Manage Tables

Question

You need to design a student registration database that contains several tables storing academic information. The STUDENTS table stores information about a student. The STUDENT_GRADES table stores information about the student's grades. Both of the tables have a column named STUDENT_ID. The STUDENT_ID column in the STUDENTS table is a primary key. You need to create a foreign key on the STUDENT_ID column of the STUDENT_GRADES table that points to the STUDENT_ID column of the STUDENTS table. Which statement creates the foreign key?

Options

  • ACREATE TABLE student_grades (student_id NUMBER(12), semester_end DATE, gpa
  • BCREATE TABLE student_grades(student_id NUMBER(12), semester_end DATE, gpa
  • CCREATE TABLE student_grades(student_id NUMBER(12), semester_end DATE, gpa
  • DCREATE TABLE student_grades(student_id NUMBER(12), semester_end DATE, gpa

How the community answered

(37 responses)
  • A
    5% (2)
  • B
    11% (4)
  • C
    3% (1)
  • D
    81% (30)

Explanation

CONSTRAINT name FOREIGN KEY (column_name) REFERENCES table_name

Topics

#foreign key#referential integrity#CREATE TABLE#constraints

Community Discussion

No community discussion yet for this question.

Full 1Z0-061 Practice