
SQL Data Constraints Quiz
Authored by Rhyven Caballero
Arts
12th Grade
Used 1+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the NOT NULL constraint ensure?
The column can have multiple values
The column cannot have a NULL value
The column must have a default value
The column can only contain unique values
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
When should you use the UNIQUE constraint?
When a column should have distinct values
When a column can accept NULL values
When a column must have a default value
When a column is a foreign key
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of a PRIMARY KEY?
To allow duplicate values in a column
To uniquely identify each row in a table
To set a default value for a column
To link two tables together
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does a FOREIGN KEY do?
Ensures a column cannot be NULL
Automatically increments a column value
Sets a default value for a column
Links a column to the primary key in another table
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What happens if you try to insert a record with a duplicate PRIMARY KEY?
The record is inserted successfully
The insertion fails
The database ignores the duplicate
The duplicate value is automatically changed
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the DEFAULT constraint do?
Links two tables together
Ensures all values in a column are unique
Sets a default value for a column
Prevents NULL values in a column
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
When is the CHECK constraint used?
To automatically generate unique values
To ensure a column value satisfies a specific condition
To prevent NULL values in a column
To link a column to another table
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?