Powered by Blogger.

Saturday, February 15, 2014

How to get distinct data from tables in sql server 2008?



In this post we will discuss how to get distinct data from tables in sql server 2008?

Also you can check my previous posts on:

- What are different types of results in MVC?

- Generics tutorial in C#.Net

- Get all tables and stored procedures in sql server 2008

'Distinct' keyword is used to eliminate duplicate values in the output of select statement.

It can be used only once in the select statement that also immediately next to the keyword 'select'.

Example:
           Select distinct deptno from Employee
           Select distinct deptno,job from Employee



0 comments

Post a Comment