Login Register
Code2night
  • Home
  • Guest Posts
  • Blog Archive
  • Tutorial
  • Languages
    • Angular
    • C
    • c#
    • C#
    • HTML/CSS
    • Java
    • JavaScript
    • Node.js
    • Python
    • React
    • Security
    • SQL Server
    • TypeScript
  • Post Blog
  • Tools
    • JSON Beautifier
    • HTML Beautifier
    • XML Beautifier
    • CSS Beautifier
    • JS Beautifier
    • PDF Editor
    • Word Counter
    • Base64 Encode/Decode
    • Diff Checker
    • JSON to CSV
    • Password Generator
    • SEO Analyzer
  1. Home
  2. Blogpost

How to Return Query Results as a Comma Separated in MySQL

Date- Jan 13,2023

5368

GROUP_CONCAT() mysql

The GROUP_CONCAT() function was built specifically for the purpose of concatenating a query’s result set into a list separated by either a comma or a delimiter of your choice.

SELECT CountryCode , GROUP_CONCAT(District) AS 'District'
FROM city
WHERE CountryCode = 'IND'
GROUP BY CountryCode;


S
Shubham Batra
Programming author at Code2Night — sharing tutorials on ASP.NET, C#, and more.
View all posts →

Related Articles

Setting up database on plesk server
Dec 09, 2023
DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled
Dec 07, 2023
How to find all tables by column name
Jan 13, 2023
LINQ
Dec 09, 2023

Comments

Contents

More in SQL Server

  • Batch Script for Creating Database backups from Sql server 11118 views
  • How to create a read-only MySQL user 10179 views
  • How to Connect to a Database with MySQL Workbench 7540 views
  • How to find all procedures having table reference in Sql ser… 6878 views
  • Converting commas or other delimiters to a Table or List in … 6380 views
View all SQL Server posts →

Tags

AspNet C# programming AspNet MVC c programming AspNet Core C software development tutorial MVC memory management Paypal coding coding best practices data structures programming tutorial tutorials object oriented programming Slick Slider StripeNet
Free Download for Youtube Subscribers!

First click on Subscribe Now and then subscribe the channel and come back here.
Then Click on "Verify and Download" button for download link

Subscribe Now | 1760
Download
Support Us....!

Please Subscribe to support us

Thank you for Downloading....!

Please Subscribe to support us

Continue with Downloading
Be a Member
Join Us On Whatsapp
Code2Night

A community platform for sharing programming knowledge, tutorials, and blogs. Learn, write, and grow with developers worldwide.

Panipat, Haryana, India
info@code2night.com
Quick Links
  • Home
  • Blog Archive
  • Tutorials
  • About Us
  • Contact
  • Privacy Policy
  • Terms & Conditions
  • Guest Posts
  • SEO Analyzer
Free Dev Tools
  • JSON Beautifier
  • HTML Beautifier
  • CSS Beautifier
  • JS Beautifier
  • Password Generator
  • QR Code Generator
  • Hash Generator
  • Diff Checker
  • Base64 Encode/Decode
  • Word Counter
  • SEO Analyzer
By Language
  • Angular
  • C
  • c#
  • C#
  • HTML/CSS
  • Java
  • JavaScript
  • Node.js
  • Python
  • React
  • Security
  • SQL Server
  • TypeScript
© 2026 Code2Night. All Rights Reserved.
Made with for developers  |  Privacy  ·  Terms
Translate Page