Amal would like to display the unique names of all students from student table. Write the SQL query for the same.
Answers
Answered by
0
Answer
select distinct name from Students;
Explanation
By default, data is selected from all the rows of the table , even if the data appearing in the result gets duplicated. The distinct keyword eliminates duplicate rows from the result of select statement.
Syntax to use Distinct Keyword
select distinct (argument name ) from (table name);
Note
In case of null values , only one null value is returned in the result, if distinct keyword is used.
Similar questions
Hindi,
5 months ago
Geography,
5 months ago
Environmental Sciences,
11 months ago
History,
1 year ago
Chemistry,
1 year ago