engineering computer science MCQ #816

What is the purpose of the DISTINCT keyword in SQL?

engineering computer science MCQ #816

  1. Question 1

    Q1. What is the purpose of the DISTINCT keyword in SQL?

    • A) To return all rows, including duplicates
    • B) To return only unique rows
    • C) To sort data
    • D) To filter data

    Answer: To return only unique rows

    Explanation: DISTINCT keyword returns only unique rows, eliminating duplicate rows from the result set.