>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

Sir, what does
    GROUP BY Concat(col1, col2)
do that
    GROUP BY col1, col2
does not? In other words, I don't see any point in using Concat().

Bob Hall

Know thyself? Absurd direction!
Bubbles bear no introspection.     -Khushhal Khan Khatak
MySQL list magic words: sql query database

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to