Search code examples
sql-serverregion

sql server #region


Can I create regions in sql server editor (like #region and #endregion in C#) ?


Solution

  • Not really, Sorry! But...

    Adding begin and end.. with a comment on the begin creates regions which would look like this...bit of hack though!

    screenshot of begin end region code

    Otherwise you can only expand and collapse you just can't dictate what should be expanded and collapsed. Not without a third-party tool such as SSMS Tools Pack.