🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← All topics

Quiz: Keys and Constraints: questions with answers

10 questions, each with the answer and a short explanation.

Take the timed quiz + get a certificate →
  1. Q1. A minimal super key is called a:
  2. Q2. How many primary keys can a table have?
  3. Q3. Which is true about a foreign key?
  4. Q4. Which constraint stops a salary of -500 from being inserted?
  5. Q5. Candidate keys that are not chosen as the primary key are called:
  6. Q6. Which statement is always true?
  7. Q7. Deleting an order must automatically delete its order items. Which foreign key option does this?
  8. Q8. Which is a difference between a primary key and a unique key?
  9. Q9. In enrollments(rollno, coursecode) the primary key is (rollno, coursecode). What kind of key is it?
  10. Q10. An INSERT gives no value for a column declared city VARCHAR(30) DEFAULT 'Jaipur'. What is stored?