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

后端 未结 4 794
借酒劲吻你
借酒劲吻你 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:22

    I just simply put in select statements into my script and it displays it to the results window..

    select * from @VarTable;

    now as I step thru my code and hit the select it will display the values. Then I either comment them out when done testing or set a Testing flag.

    Hope this helps

提交回复
热议问题