|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
Select Distinct Help
I need to use a Select Distinct statement however, I notice you can only return one field; such as:
SELECT DISTINCT airport; Does return only one rec per airport - however I need access to the other fields and would like to say: SELECT DISTINCT airport, id; but while both fields get returned, the records are not distinct. How can I make this work? Thanks... |
|
#2
|
|||
|
|||
|
DISTINCT won't work on a single column; it affects the entire row returned. If each airport has more than one id, how do you want to determine which id to match it?
__________________
"A pawn is the most important piece on the chessboard -- to a pawn" |
![]() |
| Viewing: Dev Articles Community Forums > Databases > MySQL Development > Select Distinct Help |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|