Question:medium

The SELECT command when combined with DISTINCT clause is used to:

Show Hint

Always use DISTINCT when you want to remove duplicates and retrieve only unique results in SQL queries.
Updated On: Feb 16, 2026
  • returns records without repetition
  • returns records with repetition
  • returns all records with conditions
  • returns all records without checking
Show Solution

The Correct Option is A

Solution and Explanation

Step 1: Understanding DISTINCT.
The DISTINCT keyword in SQL is used to retrieve only unique values from a result set, effectively removing any duplicate records.
Step 2: Example.
Consider a column with values: (10, 20, 10, 30).
\begin{verbatim}SELECT DISTINCT column_name FROM table;\end{verbatim} Executing this query will yield the result: (10, 20, 30).
Step 3: Eliminate wrong options.
- Option 2: Incorrect, as DISTINCT's purpose is to exclude duplicates.
- Option 3: Incorrect, as filtering is done via the WHERE clause, not DISTINCT.
- Option 4: Incorrect, as DISTINCT explicitly identifies and removes duplicate entries.

Final Answer: \[\boxed{\text{Returns records without repetition}}\]
Was this answer helpful?
0