1Z0-007 · Question #100
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 NUMBER(4,3). CONSTRAINT name FOREIGN KEY (column_name) REFERENCES table_name Incorrect answer: A invalid syntax B invalid syntax C invalid syntax
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 NUMBER(4,3),
- BCREATE TABLE student_grades(student_id NUMBER(12),semester_end DATE, gpa NUMBER(4,3),
- CCREATE TABLE student_grades(student_id NUMBER(12),semester_end DATE, gpa NUMBER(4,3),
- DCREATE TABLE student_grades(student_id NUMBER(12),semester_end DATE, gpa NUMBER(4,3),
How the community answered
(41 responses)- A12% (5)
- B2% (1)
- C5% (2)
- D80% (33)
Explanation
CONSTRAINT name FOREIGN KEY (column_name) REFERENCES table_name Incorrect answer: A invalid syntax B invalid syntax C invalid syntax
Topics
Community Discussion
No community discussion yet for this question.