Showing posts with label distinct statement in sql server. Show all posts
Showing posts with label distinct statement in sql server. Show all posts

Thursday, July 28, 2016

SQL SELECT DISTINCT Statement



Many times a table contain many duplicate values in a column and we want to show only different value then we use Distinct Keyword.

Distinct Keyword is used to return only different value.

Example –

We have table name emp:
select Distinct id from emp


output
                                                               Author - Sachin Pathak