GROUP_CONCAT has DISTINCT attribute:
SELECT GROUP_CONCAT(DISTINCT categories ORDER BY categories ASC SEPARATOR ' ') FROM table
More Related Contents:
- Can I concatenate multiple MySQL rows into one field?
- MySQL and GROUP_CONCAT() maximum length
- How to use GROUP_CONCAT in a CONCAT in MySQL
- Strange duplicate behavior from GROUP_CONCAT of two LEFT JOINs of GROUP_BYs
- What is the opposite of GROUP_CONCAT in MySQL?
- GROUP_CONCAT ORDER BY
- GROUP_CONCAT with limit
- MySQL: Sort GROUP_CONCAT values
- How create json format with group-concat mysql?
- How to hack MySQL GROUP_CONCAT to fetch a limited number of rows?
- GROUP_CONCAT equivalent in Django
- is there a length limit to group_concat or another reason why it would not work on a text field
- Trouble with GROUP_CONCAT and Longtext in MySQL
- Check if MySQL table exists without using “select from” syntax?
- How to see log files in MySQL?
- Differences between utf8 and latin1
- MySQL stored procedures use them or not to use them
- Using SQL LIKE and IN together
- SQL query of multiple values in one cell
- MySQL floating point comparison issues
- How to retrieve the current version of a MySQL database management system (DBMS)?
- Using ALTER to drop a column if it exists in MySQL
- MySQL How do you INSERT INTO a table with a SELECT subquery returning multiple rows?
- Meaning of “n:m” and “1:n” in database design
- How to force case sensitive table names?
- MySQL concat() to create column names to be used in a query?
- How to transpose rows to columns with large amount of the data in BigQuery/SQL?
- Is there a way to get the row number in Mysql like the rownum in oracle [duplicate]
- #1130 – Host ‘localhost’ is not allowed to connect to this MySQL server
- Get column sum and use to calculate percent of total (mySQL)