|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate 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
|
||||
|
||||
|
DISTINCT and non-DISTINCT SQL SELECTs Together
I'm relatively new to using SQL in my programs, but now I have great need of it and I need this question answered:
Is there any way to select DISTINCT and non-DISTINCT data in the same statement? For example: Code:
SELECT column DISTINCT other_column FROM table WHERE something = 'foo' I've attempted to find examples and/or answers related to this question, but no luck yet. Any help is much appreciated. |
|
#2
|
||||
|
||||
|
To my knowledge, this is not possible. The only way that might be possible is through a subselect and I am not really sure about that.
|
|
#3
|
||||
|
||||
|
I sort of figured not. Really, it doesn't even seem logical to try and select distinct data from one column, but non-distinct data from a second column in most cases.
Thanks anyhow for the reply. |
![]() |
| Viewing: Dev Shed Forums > Other > Beginner Programming > DISTINCT and non-DISTINCT SQL SELECTs Together |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|