title: How to organize parts of T-SQL scripts in SQL Server Management Studio?
body: <p>I'm having a problem with organizing SQL scripts that contain more than 10k lines of code.</p>
  
  <p>Let's say there's a declaration of 10 variables:</p>
  
  <pre><code>-- declaration
  DECLARE @SaleId1 int
  DECLARE @SaleId2 int
  DECLARE @SaleId3 int
  DECLARE @SaleId4 int
  DECLARE @SaleId5 int
  DECLARE @SaleId6 int
  DECLARE @SaleId7 int
  DECLARE @SaleId8 int
  DECLARE @SaleId9 int
  DECLARE @SaleId10 int
  </code></pre>
  
  <p>Is there any way to format this code so there would appear minus symbol allowing me to hide all the content and leave just comment?</p>
  
  <p>Something like this:</p>
  
  <p><img src="https://i.stack.imgur.com/dUz7c.png" alt="enter image description here"></p>