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

What is a subquery in database terminology?
A. An error log file.
B. A query that executes after the main query terminates.
C. A query that runs on a backup server.
D. A nested SQL query placed completely inside another outer query statement.
Answer: Option D
Solution (By JKExamLibrary)
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)

Discuss this Question (0)

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

Practice More Database Management System (DBMS) Questions

Question #1 Report Error
Which of the following is a DCL (Data Control Language) command?
A. CREATE
B. GRANT
C. SELECT
D. COMMIT

Correct Answer: Option B


Explanation:
GRANT and REVOKE are DCL commands. COMMIT is TCL, SELECT is DML, CREATE is DDL.

This question belongs to: Computer Database Management System (DBMS)
Question #2 Report Error
Information is:
A. Raw facts and figures
B. Hardware component
C. Processed and meaningful form of data
D. Programming code

Correct Answer: Option C


Explanation:
Information is data that has been organized and processed to provide context and meaning.

This question belongs to: Computer Database Management System (DBMS)
Question #3 Report Error
Which SQL keyword is placed immediately inside a SELECT statement or an aggregate function to eliminate duplicate rows from the output?
A. UNIQUE
B. SINGLE
C. DIFFERENT
D. DISTINCT

Correct Answer: Option D


Explanation:
The DISTINCT keyword is used to remove all duplicate values or records from the output of an SQL SELECT query.

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