List:General Discussion« Previous MessageNext Message »
From:Marek Chlup Date:July 9 2001 3:29pm
Subject:group by concat
View as plain text  
Hi!

My problem is when I use group by concat(col1,col2) when col1 and col2 
is primary keys and col1 is varchar(255):

SELECT col1,col2 FROM Table1 GROUP BY concat(col1,col2);
-> return only one row - it is bad

SELECT col1,col2 FROM Table1 GROUP BY concat(col1,col1,col2);
-> return 48 rows - it is ok, but concat(col1,col1,col2) is stupid

I change col1 to varchar(155):
SELECT col1,col2 FROM Table1 GROUP BY concat(col1,col2);
-> return 48 rows - it is ok

My platform: Linux x86, MySQL 3.23.39, table is myisam format.

Is it bug or feature?

Thanks
Marek

Thread
group by concatMarek Chlup9 Jul
  • Re: group by concatBob Hall10 Jul