3

In Microsoft SQL Server Management Studio 2016, how do i generate the "-" and "+" (like image below) to collapse/expand code blocks?

enter image description here

enter image description here

Luca Rusin
  • 81
  • 1
  • 10
  • Refer to https://learn.microsoft.com/en-us/sql/ssms/scripting/code-outlining?view=sql-server-ver16 – Tokci Dec 21 '22 at 16:55

2 Answers2

4

Use Begin End for the block of code

  • https://learn.microsoft.com/en-us/sql/ssms/scripting/code-outlining?view=sql-server-ver16 – Tokci Dec 21 '22 at 16:54
0

I can't find any way to control it. Based on the lag time between opening a file and seeing the code folding/blocks appear, I think it's based on parsing the code and then creating foldable blocks based upon that analysis and SSMS knowing the syntax of SQL statements/queries.

alroc
  • 27,574
  • 6
  • 51
  • 97