Which operator is used in SQL to compare a value to a set of values returned by a subquery? MCQ with Answer and Explanation

Which operator is used in SQL to compare a value to a set of values returned by a subquery?
A. EXISTS
B. LIKE
C. BETWEEN
D. IN
Answer: Option D
Solution (By JKSSB Mock Tests)
IN checks if a value matches any value in a list or subquery result set.

Discuss this Question (0)

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

Practice More Database Management System (DBMS) Questions

Question #1
A key that consists of more than one attribute to uniquely identify rows in a table is called a what?
A. Primary Key
B. Secondary Key
C. Composite Key
D. Foreign Key

Correct Answer: Option C


Explanation:
When a primary key or unique key comprises two or more columns (attributes) combined together, it is known as a Composite Key.

This question belongs to: Computer Database Management System (DBMS)
Question #2
What is a column in a relational database table formally called?
A. Entity
B. Degree
C. Attribute
D. Tuple

Correct Answer: Option C


Explanation:
A column in a database table represents a property or characteristic of the entity and is formally known as an attribute.

This question belongs to: Computer Database Management System (DBMS)
Question #3
Candidate keys that are not selected or designated as the primary key of a table are known as what?
A. Super Keys
B. Alternate Keys
C. Composite Keys
D. Foreign Keys

Correct Answer: Option B


Explanation:
Out of all available candidate keys, the one selected to identify rows uniquely is the primary key, and the remaining unselected candidate keys are called alternate keys.

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