1.常见做法,游标,然后串起
======================
2.直接串接,sql就是操作数据源,数据集合的语言,大大减化了数据集合的操作
declare @str as nvarchar(200)
select @str=isnull(@str,'')+b.propertyname+'|' from product_property a,property b
where a.propertyid=b.propertyid and b.parentpropertypath='5'
if @str <> ''
select @str=left(@str,len(@str)-1)
select @str