RE: converting SQL select list into unique values
8 Jan
2000
8 Jan
'00
10:15 p.m.
Darcy Clark wrote:
I have a non-unique column in a MySQL table - I have looked hard for a way in SQL to convert the results of a SELECT into a list of unique values. I know how to define a table at CREATE to have UNIQUE columns but this is not what I want to do.
For example :
If the result of the SELECT is : 1, 3, 3, 4, 2, 6, 8, 9, 4, 2, 3, 6
I would like to return: 1, 2, 3, 4, 6, 8, 9
i.e. only the unique values of the list.
any pointers ? if SQL can't do this, can Zope ? (I'm sure Zope can do it, it can do everything :)
Darcy
If I remember right...
select not_unique from table GROUP BY not_unique;
The group by aggregate will do the thing you ask for.
The standard way is: select distinct col1 from T NM
9585
Age (days ago)
9585
Last active (days ago)
0 comments
1 participants
participants (1)
-
Nemeth Miklos