How to view data in table variables during debugging session in MS SQL Management Studio 2012?

后端 未结 4 792
借酒劲吻你
借酒劲吻你 2021-02-18 20:21

I would like to debug a complex T-SQL script using SSMS 2012.

I can run the script in debug mode and place breakpoints, as well as step through my script, but I can\'t

4条回答
  •  盖世英雄少女心
    2021-02-18 21:13

    Using the next code you can see the content of your table as XML.

    DECLARE @v XML = (SELECT * FROM  FOR XML AUTO)
    

    It is useful to check what your SELECT statements return. I tested it and it works.

    Read more here.

提交回复
热议问题