What is the purpose of the SQL 'CHECK' constraint? MCQ with Answer and Explanation

What is the purpose of the SQL 'CHECK' constraint?
A. To set a default value
B. To enforce uniqueness
C. To define relationships
D. To validate data based on a condition
Answer: Option D
Solution (By JKSSB Mock Tests)
CHECK constraint ensures that values in a column meet a specified condition, such as age > 0.

Discuss this Question (0)

No comments yet. Be the first to start the discussion!

Practice More Database Management System (DBMS) Questions

Question #1
What is the default behavior of a foreign key when a referenced row is deleted?
A. Cascade delete
B. Set null
C. Restrict
D. Depends on the ON DELETE action specified

Correct Answer: Option D


Explanation:
The behavior is defined by the ON DELETE rule (CASCADE, SET NULL, RESTRICT, NO ACTION) specified in the foreign key constraint.

This question belongs to: Computer Database Management System (DBMS)
Question #2
What is the alternative mathematical term used for a 'Table' in a relational database model?
A. Attribute
B. Domain
C. Relation
D. Tuple

Correct Answer: Option C


Explanation:
In relational model terminology introduced by E.F. Codd, a table is formally referred to as a relation.

This question belongs to: Computer Database Management System (DBMS)
Question #3
What is the main purpose of indexing in a database?
A. To speed up data retrieval
B. To encrypt data
C. To delete data
D. To backup data

Correct Answer: Option A


Explanation:
Indexes improve the speed of data retrieval operations on a database table.

This question belongs to: Computer Database Management System (DBMS)