Kmspico Download | Official KMS Activator Website [New Version 2024] Fast and Easy Converter YouTube to MP3 Online KMSAuto Net Activator Download 2024 Immediate Byte Pro Neoprofit AI Blacksprut without borders. Discover new shopping opportunities here where each link is an entrance to a world ruled by anonymity and freedom.

MySQL Distinct Clause

MySQL Distinct Clause

Many times it happens that when you execute the SELECT statement, the data in the results is duplicated. For example, you select category table and show all its rows.

When you do this, it may be that the values ​​of any 2 rows are same. This can happen in any column. This is called duplicate data.

Data duplicate can be due to many reasons. For example, if you accidentally entered the information of a employee twice, etc. If you want to have duplicate data in your results, you can use DISTINCT clause for it.

DISTINCT clause eliminates all duplicate rows from the result. The result is the only row show that came first in the result. All the remaining next duplicate rows are removed.

DISTINCT clause is defined before the list of columns and after the SELECT statement. It compares all the rows and then shows results. An example of this is being given below.

mysql> select distinct name from category;

When the above statement is executed, the category table displays a list of unique category names.