How Stuff and 'For Xml Path' work in Sql Server

后端 未结 9 1348
盖世英雄少女心
盖世英雄少女心 2020-11-21 13:49

Table is:

+----+------+
| Id | Name |
+----+------+    
| 1  | aaa  |
| 1  | bbb  |
| 1  | ccc  |
| 1  | ffffd  |
| 1  | eee  |
+----+------+

9条回答
  •  無奈伤痛
    2020-11-21 14:24

    I did debugging and finally returned my 'stuffed' query to it it's normal way.

    Simply

    select * from myTable for xml path('myTable')
    

    gives me contents of the table to write to a log table from a trigger I debug.

提交回复
热议问题