On this blog I will explain how to show the users details in single row some time we this type of query in our project
First I create a table with table name tbl_student_list
CREATE TABLE `tbl_student_list` (
`id` int(11) NOT NULL,
`name` varchar(100) NOT NULL,
`email` varchar(100) NOT NULL,
`mobile_no` varchar(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
ALTER TABLE `tbl_student_list`
ADD PRIMARY KEY (`id`);
ALTER TABLE `tbl_student_list`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
COMMIT;
Then Insert some records
INSERT INTO `tbl_student_list` (`id`, `name`, `email`, `mobile_no`) VALUES
(1, 'rajesh', 'rajesh@gmail.com', '9999999999'),
(2, 'savi', 'savi@gmail.com', '9999999999'),
(3, 'swara', 'swara@gmail.com', '9999999999'),
(4, 'sanchi', 'sanchi@gmail.com', '9999999999');
Now tbl_student_list table looks like this below screen

Now run this query
SELECT group_concat(concat(email)) as email FROM `tbl_student_list`
Now output Looks like with separated with,

If you want to separator with / or then then try this query
SELECT group_concat(name separator '/') as email FROM `tbl_student_list`

Thanks if you have any suggestion please comment