Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I define #regions in the visual studio 2012 t-sql editor?

I would like to know if there is an extension that allows me to define regions inside the visual studio 2012 editor while editing user defined functions or plain t-sql queries.

I've tried the following but it doesn't seem to do much:

-- #region This is a region with t-sql code
   ...
-- #endregion
like image 327
Peter Avatar asked Oct 29 '12 09:10

Peter


1 Answers

SQL Visualizer allows for code regions. Using that, you can start a region with --REGION and end it again with -- END REGION.

There's also the SSMS toolpack.

Natively, you could choose to wrap the specific blocks with BEGIN and END statements:

http://msdn.microsoft.com/en-us/library/cc281835.aspx

like image 127
SchmitzIT Avatar answered Nov 15 '22 08:11

SchmitzIT