Q
Problem solve Get help with specific problems with your technologies, process and projects.

Using the DISTINCT keyword to display results once

If I have a database that has customers in the database more than once, how can I do a query and have the customer only listed once?

You just apply a distinct keyword to the select list. For example:

 select distinct customername from customers

 

For More Information

Dig Deeper on Microsoft SQL Server Installation

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchBusinessAnalytics

SearchDataCenter

SearchDataManagement

SearchAWS

SearchOracle

SearchContentManagement

SearchWindowsServer

Close