tags:

views:

35

answers:

2

Hi

in my db there are 5 fields (id, list_date, amount, total, m_from)

and contain data, for example :

1 - 1/1/2010 - 10 - 50 - 'example111'

1 - 1/1/2010 - 10 - 50 - 'example111'

1 - 1/4/2010 - 10 - 50 - 'example154

1 - 1/1/2010 - 10 - 50 - 'example111'

1 - 1/5/2010 - 10 - 50 - 'test'

I need to know how I can get dates from list_date but without repeatable dates like '1/1/2010, 1/5/2010, 1/4/2010'

Thanks in Advance.

+3  A: 
SELECT DISTINCT list_date FROM table
kemp
A: 

If i'm not mistaken you can use also GROUP BY:

SELECT list_date FROM table GROUP BY list_date
Silvio Iannone
You are not mistaken
littlegreen
You're not mistaken, but please don't use GROUP BY if you need DISTINCT. They are not the same. Sure, a GROUP BY may be 'optimized' to a DISTINCT internally, but it's just wrong.
Martijn Engler