Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sql server 2000, writing a query where each key will show only once 1

Status
Not open for further replies.

pssheba

Programmer
Oct 22, 2004
87
IL
Hi !
My code is such as:
Code:
select phone from myphones
if some tel. numbers show more than once, i want it to appear once only.
Is that possible ?
Thanks !
 
You need the DISTINCT keyword:

Code:
select distinct phone from myphones

Hope this helps


Geraint

The lights are on but nobody's home, my elevator doesn't go to the top. I'm not playing with a full deck, I've lost my marbles. Barenaked Ladies - Crazy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top