COMPUTER SCIENCE AND ENGINEERING
SQL
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
Which SQL statement is used to return only different values?
|
SELECT DISTINCT
|
|
SELECT UNIQUE
|
|
SELECT DIFFERENT
|
|
None of the above
|
Explanation:
Detailed explanation-1: -The SELECT DISTINCT statement is used to return only distinct (different) values.
Detailed explanation-2: -The unique values are fetched when we use the distinct keyword. SELECT DISTINCT returns only distinct (different) values. DISTINCT eliminates duplicate records from the table. DISTINCT can be used with aggregates: COUNT, AVG, MAX, etc.
Detailed explanation-3: -The DISTINCT keyword in the SELECT clause is used to eliminate duplicate rows and display a unique list of values. In other words, the DISTINCT keyword retrieves unique values from a table.
There is 1 question to complete.