Multiple choice

Which SQL statement is used to return only different (non duplicate) values in a select statement?

  1. Distinct

  2. Primary key

  3. Unique

  4. Different

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

There are situations where the values in a column are repeated. For example, the city column of a table can have many records of Mumbai, Delhi etc. To display the repeated values just once we can put the distinct clause with the where clause. For example, the statement select distinct(city) from list will display the name of a city only once. If the name of a city is present in the table more than once it will be shown just once.