A Primary Key in RDBMS must be: MCQ with Answer and Explanation

A Primary Key in RDBMS must be:
A. Duplicate values allowed
B. Unique and not null
C. Always a foreign key
D. Can have null values
Answer: Option B
Solution (By JKSSB Mock Tests)
A primary key uniquely identifies each record and cannot contain null values.

Discuss this Question (0)

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

Practice More Database Management System (DBMS) Questions

Question #1
In SQL, what does the wildcard '%' match when used with LIKE?
A. Any string of zero or more characters
B. Only digits
C. A specific character
D. Any single character

Correct Answer: Option A


Explanation:
'%' matches any sequence of zero or more characters, while '_' matches a single character.

This question belongs to: Computer Database Management System (DBMS)
Question #2
Which of the following is NOT an aggregate function in standard SQL?
A. AVG()
B. LENGTH()
C. COUNT()
D. SUM()

Correct Answer: Option B


Explanation:
SUM(), AVG(), and COUNT() are aggregate functions operating on multiple rows, whereas LENGTH() is a scalar function acting on a single text value.

This question belongs to: Computer Database Management System (DBMS)
Question #3
What is a subquery in database terminology?
A. A query that executes after the main query terminates.
B. A nested SQL query placed completely inside another outer query statement.
C. An error log file.
D. A query that runs on a backup server.

Correct Answer: Option B


Explanation:
A subquery (or nested query) is an inner SQL SELECT statement embedded within an outer statement (such as a WHERE, FROM, or SELECT clause).

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