Which of the following is a valid SQL constraint that ensures a column's values are all distinct? MCQ with Answer and Explanation

Which of the following is a valid SQL constraint that ensures a column's values are all distinct?
A. Both A and B
B. UNIQUE
C. DISTINCT
D. PRIMARY KEY
Answer: Option A
Solution (By JKExamLibrary)
Both UNIQUE and PRIMARY KEY enforce uniqueness. PRIMARY KEY also implies NOT NULL.

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 a data mart?
A. A type of database
B. A backup technique
C. A query language
D. A subset of a data warehouse focused on a specific business unit or function

Correct Answer: Option D


Explanation:
A data mart is a specialized data warehouse for a specific department, team, or subject area.

This question belongs to: Computer Database Management System (DBMS)
Question #2
Which of the following is a DML statement?
A. CREATE
B. ALTER
C. UPDATE
D. DROP

Correct Answer: Option C


Explanation:
UPDATE is a Data Manipulation Language (DML) command used to modify existing records in a table. CREATE, ALTER, DROP are DDL.

This question belongs to: Computer Database Management System (DBMS)
Question #3
What value represents missing, unknown, or inapplicable data in a relational database?
A. Void
B. Blank Space (' ')
C. NULL
D. Zero (0)

Correct Answer: Option C


Explanation:
NULL is a special marker used in SQL to indicate the absence of a value or that the data is missing, unknown, or not applicable.

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