利用sql里的xpath生成表格
SELECT (SELECT * from Common.Common_Setup_CityData FOR XML PATH('tr'), TYPE).query('
for $item in /tr
return
<tr>
<td>{ $item/CityID/text() }</td>
<td>{ $item/Name/text() }</td>
<td>{ $item/FullName/text() }</td>
</tr>
') as Result;