What is a subquery in database terminology? MCQ with Answer and Explanation

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.
Answer: Option B
Solution (By JKSSB Mock Tests)
A subquery (or nested query) is an inner SQL SELECT statement embedded within an outer statement (such as a WHERE, FROM, or SELECT clause).

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 dictionary in a DBMS?
A. A log file
B. A backup of the database
C. A table containing user data
D. A repository of metadata about the database

Correct Answer: Option D


Explanation:
The data dictionary stores metadata such as table definitions, column types, constraints, and other database objects.

This question belongs to: Computer Database Management System (DBMS)
Question #2
What is a database instance?
A. The state of a database at a particular moment in time
B. A backup
C. The schema definition
D. A query result

Correct Answer: Option A


Explanation:
A database instance refers to the data stored in the database at a specific time, as opposed to the schema (structure).

This question belongs to: Computer Database Management System (DBMS)
Question #3
What is a domain in the context of the relational model?
A. A table name
B. A set of allowed values for an attribute
C. A foreign key
D. A primary key

Correct Answer: Option B


Explanation:
A domain defines the set of permissible values that an attribute can take, ensuring data consistency.

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