Which MySQL function joins values from multiple rows of a group into one string?
A
CONCAT_WS()
B
STRING_AGG()
C
GROUP_CONCAT()
Correct answer
D
JOIN_ROWS()
Correct answer
C. GROUP_CONCAT()
17 views
⚔️
Challenge a friend on MySQL
Same MCQs, timed, live leaderboard. Send the link on WhatsApp – no sign-up needed.
Create challenge
Explanation
GROUP_CONCAT() , used with GROUP BY, combines values such as product names per order into one comma-separated string. CONCAT_WS joins columns within a single row.
Reference
Asked in: NTS, Technical Interviews
Doubts & discussionNot sure why the answer is C? Ask here and get an explanation.
Ask a doubt about this MCQ
‹ Previous MCQ In MySQL, which rows does SELECT * FROM t LIMIT 5 OFFSET 10 return (in the given order)? Next MCQ › What is the key difference between CHAR and VARCHAR in MySQL?