MCQ King
MySQL – Primary Keys and Indexes MCQ
1 / 27
1. What is the primary purpose of a primary key in MySQL?
2 / 27
2. Which attribute must a primary key column NOT have in MySQL?
3 / 27
3. What is the primary function of an index in a MySQL table?
4 / 27
4. Which type of index does MySQL create automatically when you define a primary key?
5 / 27
5. In MySQL, what does a UNIQUE constraint on a column ensure?
6 / 27
6. How does an index speed up data retrieval in MySQL?
7 / 27
7. What happens when you create a foreign key constraint in MySQL?
8 / 27
8. Which type of index is automatically created when you define a primary key in MySQL?
9 / 27
9. What is the primary benefit of using a primary key in MySQL?
10 / 27
10. What is the main purpose of a foreign key in MySQL?
11 / 27
11. What is a composite primary key in MySQL?
12 / 27
12. Which type of index is automatically created on a foreign key column in MySQL?
13 / 27
13. How does an index affect the performance of SELECT queries in MySQL?
14 / 27
14. What is a recommended practice when choosing columns for indexing in MySQL?
15 / 27
15. Which attribute should NOT be associated with a primary key column in MySQL?
16 / 27
16. What happens when you create a UNIQUE constraint on a column in MySQL?
17 / 27
17. In MySQL, what is the primary function of a primary key?
18 / 27
18. What type of index is created when you define a primary key in MySQL?
19 / 27
19. What is the primary purpose of using a UNIQUE constraint in MySQL?
20 / 27
20. How does a primary key affect data integrity in MySQL?
21 / 27
21. What is the primary benefit of using indexes in a MySQL table?
22 / 27
22. When defining a primary key in MySQL, what is recommended for the selection of columns?
23 / 27
23. Which attribute of a primary key column ensures data uniqueness in MySQL?
24 / 27
24. How can you create a composite primary key in MySQL?
25 / 27
25. What type of queries are typically optimized by using indexes in MySQL?
26 / 27
26. Which attribute should NOT be associated with an indexed column in MySQL?
27 / 27
27. What is the primary purpose of creating a foreign key constraint in MySQL?
Your score is
Restart quiz