Re: Select distinct field won't return distinct value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Blanton, Bob wrote:
I'm just learning MySQL so don't know all the syntax.  There is a "LIST"
function in Sybase Adaptive Server Anywhere which would do that.  Is
there an equivalent function in MySQL?

Query:
SELECT distinct niin, list(serial_number) FROM
fmds.maintenance_equipment
group by niin
order by niin

Output:
niin		list(serial_number)
000213909	B71-11649,B71-11657,B71-11650
000473750	BAF-3750-0001,BAF-3750-0002,BAF-3750-0003
000929062	2341
001139768	2207

Pretty sure that's a sybase specific function. Nothing like that exists in mysql or postgresql.

--
Postgresql & php tutorials
http://www.designmagick.com/

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux