READ Free Dumps For Oracle- 1z0-007
Question ID 8019 | 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? |
Option A | CREATE TABLE student_grades (student_id NUMBER(12),semester_end DATE, gpa NUMBER(4,3), CONSTRAINT student_id_fk REFERENCES (student_id) FOREIGN KEY student (student_id)); |
Option B | CREATE TABLE student_grades(student_id NUMBER(12),semester_end DATE, gpa NUMBER(4,3), student_id_fk FOREIGN KEY (student_id) REFERENCES students (student_id)); |
Option C | CREATE TABLE student_grades(student_id NUMBER(12),semester_end DATE, gpa NUMBER(4,3), CONSTRAINT FOREIGN KEY (student_id) REFERENCES student (student_id)); |
Option D | CREATE TABLE student_grades(student_id NUMBER(12),semester_end DATE, gpa NUMBER(4,3), CONSTRAINT student_id_fk FOREIGN KEY (student_id) REFERENCES students (student_id)); |
Correct Answer | D |
Question ID 8020 | Explanation/Reference: Explanation : CONSTRAINT name FOREIGN KEY (column_name) REFERENCES table_name (colomn_name); Incorrect answer : A invalid syntax B invalid syntax C invalid syntax Refer : Introduction to Oracle9i : SQL, Oracle University Study Guide, 10-14 |
Option A | It releases the storage space used by the table. |
Option B | It does not release the storage space used by the table. |
Option C | You can roll back the deletion of rows after the statement executes. |
Option D | You can NOT roll back the deletion of rows after the statement executes. |
Option E | An attempt to use DESCRIBE on the DEPT table after the TRUNCATE statement executes will display an error. |
Option F | You must be the owner of the table or have DELETE ANY TABLE system privileges to truncate the DEPT table |
Correct Answer | ADF |