SQL: Constraints


Choose an answer and hit 'next'. You will receive your score and answers at the end.

question 1 of 3

What often sets apart constraints in the code?

Create Your Account To Take This Quiz

As a member, you'll also get unlimited access to over 79,000 lessons in math, English, science, history, and more. Plus, get practice tests, quizzes, and personalized coaching to help you succeed.

Try it risk-free
Try it risk-free for 30 days. Cancel anytime
Already registered? Log in here for access

1. What constraint would be useful to make sure that an ID number is not issued twice?

2. Which of these is properly formatted, assuming it is not the last column in a table in SQL?

Create your account to access this entire worksheet
A Premium account gives you access to all lesson, practice exams, quizzes & worksheets
Access to all video lessons
Quizzes, practice exams & worksheets
Certificate of Completion
Access to instructors
Create an account to get started Create Account

About This Quiz & Worksheet

Put your knowledge of constraints in SQL to use with this quiz/worksheet combo. You will be asked to apply knowledge of syntax, and specific commands to a series of questions.

Quiz & Worksheet Goals

This quiz will help you test yourself on concepts like:

  • What can be used to set apart constraints
  • A constraint that could be used to make sure an ID number is only issued once
  • A useful constraint for making sure every record is assigned a name

Skills Practiced

  • Critical thinking - apply relevant concepts to examine information about different constraints to recognize what a set of code would do to a database
  • Defining key concepts - ensure that you can accurately recognize main phrases from their description, such as what constraint can be used to make sure there are no duplicate IDs in a database
  • Knowledge application - use your knowledge to answer questions about how to properly format commands in SQL using constraints

Additional Learning

Learn more about SQL with the lesson titled SQL: Constraints. It will teach you things like:

  • Where to place a constraint
  • How the VARCHAR constraint can be used in different databases
  • What a constraint does to a database