Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Co-Related sub query
create table #tmp(roleid int,comid varchar) insert into #tmp values(1,'A'),(1,'B'),(2,'C'),(2,'D') select * from #tmp SELECT roleid, comid= STUFF((SELECT ', ' + comid FROM #tmp r where r.roleid=t.roleid FOR XML PATH('')), 1, 2, '') FROM #tmp t GROUP BY roleid SELECT ', ' + comid FROM #tmp r FOR XML PATH('') drop table #tmp
run
|
edit
|
history
|
help
0
concatenate dates for two distinct cases
Tablestudent
Libros
1512081 QUAN LY DE TAI
New
Finding gaps, NOT EXISTS clause analysis_1_put on a wall
mysql4
ankit
try catch, raiserror and throw
Solution 2