MCQOPTIONS
Saved Bookmarks
This section includes 12 Mcqs, each offering curated multiple-choice questions to sharpen your Structured Query Language (SQL) knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
Which clause in the SQL standard controls how NULL values in a composite foreign key are handled when comparing to a primary key. |
| A. | SET |
| B. | MATCH |
| C. | ON DELETE |
| D. | ON CASCADE |
| Answer» C. ON DELETE | |
| 2. |
Which keyword is used to specify the foreign key after the table is created? |
| A. | SETUP |
| B. | SET |
| C. | ALTER TABLE |
| D. | SPECIFY |
| Answer» D. SPECIFY | |
| 3. |
WHICH_KEYWORD_IS_USED_TO_SPECIFY_THE_FOREIGN_KEY_AFTER_THE_TABLE_IS_CREATED??$ |
| A. | SETUP |
| B. | SET |
| C. | ALTER TABLE |
| D. | SPECIFY |
| Answer» D. SPECIFY | |
| 4. |
Which_clause_in_the_SQL_standard_controls_how_NULL_values_in_a_composite_foreign_key_are_handled_when_comparing_to_a_primary_key.$ |
| A. | SET |
| B. | MATCH |
| C. | ON DELETE |
| D. | ON CASCADE |
| Answer» C. ON DELETE | |
| 5. |
Which clause is used to remove a foreign key constraint? |
| A. | REMOVE |
| B. | DELETE |
| C. | DROP |
| D. | EXCLUDE |
| Answer» D. EXCLUDE | |
| 6. |
If the storage engine InnoDB is not used, foreign key cannot be used. |
| A. | True |
| B. | False |
| Answer» B. False | |
| 7. |
Which clause names the parent table and the index columns in the table? |
| A. | REFERENCES |
| B. | ON DELETE |
| C. | CONSTRAINT |
| D. | FOREIGN KEY |
| Answer» B. ON DELETE | |
| 8. |
The property of InnoDB that enforces foreign key relationships stay intact is called _____________ |
| A. | atomicity |
| B. | durability |
| C. | consistency |
| D. | referential integrity |
| Answer» E. | |
| 9. |
Which storage engine in MySQL provides foreign key support? |
| A. | TRANSACTION |
| B. | InnoDB |
| C. | MyISAM |
| D. | MEMORY |
| Answer» C. MyISAM | |
| 10. |
Deletion of an employee from table also deletes that employee from another table. This kind of delete is called ____________ |
| A. | transparent |
| B. | concrete |
| C. | elaborate |
| D. | cascaded |
| Answer» E. | |
| 11. |
Foreign keys cannot handle deletes and updates. |
| A. | True |
| B. | False |
| Answer» C. | |
| 12. |
Which key declares that an index in one table is related to that in another? |
| A. | primary |
| B. | secondary |
| C. | foreign |
| D. | cross |
| Answer» D. cross | |