July 14, 2016

Single SQL query with GROUP_CONCAT, DISTINCT and SEPARATOR.



Here is example for use GROUP_CONCAT, DISTINCT and SEPARATOR in single sql query,

Example:

SELECT group_concat(distinct (id) SEPARATOR ', ') AS ID FROM (tablename) WHERE 1=1

Enjoy!

No comments:

Post a Comment

The Future of Technology: Emerging Trends to Watch in 2025

Introduction As we navigate through 2025, the technological landscape continues to evolve at an unprecedented pace. Innovations that once se...