Informatics Practices

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

SQL Queries

1 Like

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.

Answered By

3 Likes


Related Questions