|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
How to select rows with no duplicate values?
I'll post a example table, just to explain what i want to be done:
----------- mike 82456 dire@dsfsd.com steve 88878 dsf@sdfsadf.com cheff 23423 sdfsf@sdafasdf.com mike 23423 sdfa@sasd.com steve 35235 streertert@sdfasfdsd.com ------------ This table is contains information about people, the first column is "userName", second "telephone", third "email".... So i want to select only rows that have unique "userName", no duplicates. After the selection i want the result to be like this: -------------- mike 82456 dire@dsfsd.com steve 88878 dsf@sdfsadf.com cheff 23423 sdfsf@sdafasdf.com -------------- ..second mike and steve where not selected? How can i do that? Every answer will be apreaciated... thanks in advance... |
|
#2
|
|||
|
|||
|
Try:
select distinct userName, telephone, email from MyTableName |
|
#3
|
|||
|
|||
|
Thank you very much! Distinct helped me all the way...
|
![]() |
| Viewing: Dev Shed Forums > Databases > Firebird SQL Development > How to select rows with no duplicate values? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|