select ‘[‘+title_a+‘,‘+title_b +‘]‘ from A for xml path(‘‘)
SELECT *, (select ‘[‘+title_a+‘,‘+title_b +‘]‘ from A where A.t_id=B.t_id for xml path(‘‘)) FROM B
时间: 2024-10-22 04:01:33
select ‘[‘+title_a+‘,‘+title_b +‘]‘ from A for xml path(‘‘)
SELECT *, (select ‘[‘+title_a+‘,‘+title_b +‘]‘ from A where A.t_id=B.t_id for xml path(‘‘)) FROM B