Which constraint ensures that a column cannot have NULL values? MCQ with Answer and Explanation

Which constraint ensures that a column cannot have NULL values?
A. FOREIGN KEY
B. UNIQUE
C. PRIMARY KEY
D. NOT NULL
Answer: Option D
Solution (By JKSSB Mock Tests)
NOT NULL constraint enforces that a column must have a value, preventing NULL entries.

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 purpose of the SQL 'CONSTRAINT' keyword?
A. To create views
B. To create indexes
C. To join tables
D. To define rules for data integrity

Correct Answer: Option D


Explanation:
Constraints are used to enforce rules on data, such as NOT NULL, UNIQUE, PRIMARY KEY, FOREIGN KEY, and CHECK.

This question belongs to: Computer Database Management System (DBMS)
Question #2
What is the purpose of the SQL 'JOIN' clause?
A. To create a new table
B. To delete records from a table
C. To combine rows from two or more tables based on a related column
D. To combine columns from multiple tables into a single table

Correct Answer: Option C


Explanation:
JOIN is used to combine rows from different tables based on a common column, allowing querying across related tables.

This question belongs to: Computer Database Management System (DBMS)
Question #3
In SQL, which statement is used to create a new database?
A. NEW DATABASE
B. CREATE DATABASE
C. CREATE SCHEMA
D. CREATE TABLE

Correct Answer: Option B


Explanation:
CREATE DATABASE is used to create a new database in SQL.

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