Use DISTINCT to eliminate duplicate rows


In a table there may be data available i.e. duplicate. Each time you querying and get all the duplicate data.

Use DISTINCT to avoid it.

Suppose in a coountry table there are two same country name the using DISTINCT you will get the only one name for each country.

SELECT DISTINCT country_name FROM table_country;

Leave a Reply

Your email address will not be published. Required fields are marked *