471,092 Members | 1,504 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,092 software developers and data experts.

Reducing like returned data

I am working on a personal project and am drawing a complete blank
(too much celebrating last night?) on the SQL term that is used to
eliminate multiples of like data when it is returned from the
database.

ie, instead of ....
red
blue
red
green

it would return ...
red
blue
green

Sorry for the trouble and thanks.
Jul 20 '05 #1
2 1089
DISTINCT or GROUP BY will do that for you.

Example:

SELECT DISTINCT colour
FROM ColourTable

--
David Portas
------------
Please reply only to the newsgroup
--
Jul 20 '05 #2
Thanks, David!

On Thu, 1 Jan 2004 23:47:08 -0000, "David Portas"
<RE****************************@acm.org> wrote:
DISTINCT or GROUP BY will do that for you.

Example:

SELECT DISTINCT colour
FROM ColourTable

--
David Portas
------------
Please reply only to the newsgroup


Jul 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

10 posts views Thread by Tony | last post: by
7 posts views Thread by Jonas Stein | last post: by
3 posts views Thread by Gary W. Smith | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.