noob query

I'd like to write a simple select query. In a particular 1000-row db I
have one column (field) where many of the rows (records) have the same
entry. I'd like to write a query that returns all the different entries
in that column, but each one only once.
grant [ Sa, 16 Dezember 2006 22:04 ] [ ID #1570044 ]

Re: noob query

grant wrote:
> I'd like to write a simple select query. In a particular 1000-row db I
> have one column (field) where many of the rows (records) have the same
> entry. I'd like to write a query that returns all the different entries
> in that column, but each one only once.

Use DISTINCT

example: SELECT DISTINCT field FROM mytable


--

//Aho
Shion [ Sa, 16 Dezember 2006 22:09 ] [ ID #1570045 ]

Re: noob query

Post removed (X-No-Archive: yes)
Notifier Deamon [ Di, 19 Dezember 2006 20:34 ] [ ID #1572733 ]
PHP » alt.php.sql » noob query

Vorheriges Thema: "Client does not support authentication protocol ..."
Nächstes Thema: Help with query - strange behaviour