摆脱SQL代码中的换行符

时间:2015-09-02 17:58:14

标签: sql sql-server-2012 ssms

在SSMS中,我可以通过right click>编辑视图script view as> create/alter/etc.这会打开一个像这样的窗口

USE [DataBaseName]
GO

/****** Object:  View [dbo].[ViewName]    Script Date: 02/9/2015 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

ALTER view [dbo].[ViewName] as

--Script goes here
--Script goes here

GO

每次打开视图时,SSMS都会在脚本和周围的文本之间添加换行符,直到最终看起来像

USE [DataBaseName]
GO

/****** Object:  View [dbo].[ViewName]    Script Date: 02/9/2015 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO





ALTER view [dbo].[ViewName] as

--Script goes here
--Script goes here





GO

如何禁用此功能?虽然可以忍受,但它有点恼人,而且我不必花时间删除换行符。我找到了one similar question,但它没有任何答案。

0 个答案:

没有答案