SELECT distinct c1,array_to_string(array(SELECT c2 FROM T1 B where
A.c1=B.c1),', ') from T1 A order by c1;
Give it a Try !!!
Rolando A. Edwards
MySQL DBA (SCMDBA)
155 Avenue of the Americas, Fifth Floor
New York, NY 10013
212-625-5307 (Work)
201-660-3221 (Cell)
AIM & Skype : RolandoLogicWorx
re
I found a good solution.
drop table if exists t3;
drop table if exists t2;
drop table if exists t1;
create table t1 ( id int primary key, title varchar(10) );
insert into t1 values (1,'abcde'),(2,'fghi');
create table t2 (id int primary key,t1id int not null references t1 (id)
,somedate date);
in
I can only see a LIMIT 1 possible. If someone can come up with LIMIT N on this
one, please let us all know.
rolando=# drop table if exists t2;
DROP TABLE
rolando=# drop table if exists t1;
DROP TABLE
rolando=# create table t1 ( id int primary key, title varchar(10) );
NOTICE: CREATE TABLE / PRIM