Hello list,

I'm getting the distinct 'params' columns from a table with this query

SELECT DISTINCT params FROM table;

but this gets the rows with distinct 'params' cols, but I want to know from which row each params correspond, like this (which is not correct)

SELECT id, DISTINCT params FROM table;

and the query based in a recent post doesn't work

select distinct on (params), params, id
from table order by params, id


I checked the syntax and the later isn't correct.

Any ideas?

--
Nuno Pereira
Estagiário
Carclasse - Comércio Automóveis, S.A.
Lugar Sr. dos Perdões - Ribeirão (Famalicão)
Telf.: 252 330 550 - Tlm: 965 215 076
email: [EMAIL PROTECTED]


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to