sql-server – 数据库 – 如何在TSQL中创建区域(SQL Server 2008)

前端之家收集整理的这篇文章主要介绍了sql-server – 数据库 – 如何在TSQL中创建区域(SQL Server 2008)前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
有没有办法在sql脚本文件中创建可折叠区域,就像我们在VS中创建的那样
#region ….. #endregion?

– 编辑 –

脚本文件包含像Alter Table和Alter View等DDL语句,我想将它们分组到像“表相关语句”“查看相关语句”等区域.

解决方法

是的,有 SSMS Tools Pack

@H_403_13@Regions and Debug sections

Regions behave in the same way as in Visual Studio. You can collapse them and expand them. Debug sections are sections that get commented when you change your script to Release configuration. A debug section is also a collapsable region. If you deploy a script in debug mode with added debug sections it will fail when run from SSMS without SSMS Tools Pack installed. You can of course comment those sections yourself by simply searching for start and end text of the debug sections

原文链接:https://www.f2er.com/mssql/81750.html

猜你在找的MsSQL相关文章