Loading

Quipoin Menu

Learn • Practice • Grow

sql / SQL Constraints
mcq
Direction: Choose the correct option

Q1.

What are constraints in SQL?
A. Indexes
B. Rules enforced on data
C. Column types
D. Table names
Direction: Choose the correct option

Q2.

Which constraint ensures a column cannot have NULL values?
A. NOT ZERO
B. NULL CHECK
C. NOT NULL
D. NO NULL
Direction: Choose the correct option

Q3.

CREATE TABLE products (
price DECIMAL CHECK (price > 0)
);
What constraint is applied?
A. Not null
B. Foreign key
C. Check constraint
D. Unique constraint
Direction: Choose the correct option

Q4.

What does DEFAULT constraint do?
A. Ensures uniqueness
B. Creates index
C. Sets default value for column
D. Prevents duplicates
Direction: Choose the correct option

Q5.

Which constraint ensures all values in a column are different?
A. DIFFERENT
B. PRIMARY KEY
C. DISTINCT
D. UNIQUE