Which SQL keyword is placed immediately inside a SELECT statement or an aggregate function to eliminate duplicate rows from the output? MCQ with Answer and Explanation

Which SQL keyword is placed immediately inside a SELECT statement or an aggregate function to eliminate duplicate rows from the output?
A. UNIQUE
B. DIFFERENT
C. SINGLE
D. DISTINCT
Answer: Option D
Solution (By JKExamLibrary)
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)

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
What happens when a database transaction triggers a 'COMMIT' statement?
A. The transaction pauses temporarily.
B. The database structure is dropped.
C. All changes made by the transaction are made permanent on disk storage.
D. The transaction is aborted and wiped.

Correct Answer: Option C


Explanation:
Executing a COMMIT statement instructs the database engine to save all data updates performed during the transaction permanently into physical storage.

This question belongs to: Computer Database Management System (DBMS)
Question #2 Report Error
Which type of JOIN returns all matching rows from both tables, plus all unmatched rows from the left table with NULL values filled in for the right table columns?
A. Left Outer Join
B. Inner Join
C. Right Outer Join
D. Full Outer Join

Correct Answer: Option A


Explanation:
A Left Outer Join preserves all records from the left table, matching them with right table records when possible, or inserting NULL values if no match is found.

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

Correct Answer: Option D


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)