What does a database constraint called a 'CHECK' constraint do? MCQ with Answer and Explanation

What does a database constraint called a 'CHECK' constraint do?
A. It automatically links tables together.
B. It checks if the database server is running safely.
C. It limits the range of values that can be placed in a column based on a specific condition.
D. It verifies user authentication passwords.
Answer: Option C
Solution (By JKExamLibrary)
A CHECK constraint enforces domain integrity by limiting the values accepted by a column to only those that satisfy a specified Boolean predicate.

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

Discuss this Question (0)

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

Practice More Database Management System (DBMS) Questions

Question #1 Report Error
Which SQL statement is used to delete an existing view from the database catalog?
A. DROP VIEW
B. REMOVE VIEW
C. DELETE VIEW
D. CLEAR VIEW

Correct Answer: Option A


Explanation:
Because a View is a database structural object, it is removed from the database schema using the DDL command 'DROP VIEW'.

This question belongs to: Computer Database Management System (DBMS)
Question #2 Report Error
Which of the following is a valid SQL statement to add a new column to a table?
A. ALTER TABLE table_name ADD COLUMN column_name datatype;
B. Both A and C
C. ALTER TABLE table_name ADD column_name datatype;
D. ADD COLUMN TO table_name column_name datatype;

Correct Answer: Option B


Explanation:
Both 'ADD column_name datatype' and 'ADD COLUMN column_name datatype' are valid syntax in some DBMS, but standard SQL uses 'ADD column_name datatype'. However, many DBMS support both.

This question belongs to: Computer Database Management System (DBMS)
Question #3 Report Error
Which SQL command deletes all rows from a table without deleting the structural schema, cannot be rolled back easily in some systems, and does not fire delete triggers?
A. TRUNCATE
B. DROP
C. DELETE
D. REMOVE

Correct Answer: Option A


Explanation:
TRUNCATE is a DDL command that quickly removes all records from a table by deallocating the data pages, bypassing row-level logging and triggers while leaving the table structure intact.

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