CBSE Class 12 Informatics Practices Question 34 of 79

Database Query using SQL — Question 5

Back to all questions
5
Question

Question 5

If column "Marks" contains the data set {25, 35, 25, 35, 38}, what will be the output after the execution of the given query?

SELECT DISTINCT(MARKS) FROM STUDENTS;
  1. 25, 35, 25, 35, 38
  2. 25, 25, 35, 35, 38
  3. 25, 35, 38
  4. 25, 25, 35, 35
Answer

25, 35, 38

Reason — The DISTINCT keyword in the SQL is used to remove duplicate rows from the results of a SELECT statement. Therefore, the output of the query will include each distinct value from the "Marks" column, which are 25, 35, and 38.