1
希望这是一个新手问题。SQL Server 2008/2012 - 视图和sql格式
因此,如果我在我的SQL和我的where子句中有几个子选择,我不太满意视图设计器中的格式,这似乎是唯一的在保存后显示/显示我的意见的方式。
总之,有什么方法可以直接编辑SSMS中的视图,并让视图在我的代码中保留格式?
即;
select case /*comment */
when a = 5
then b = 2
else b = 4 /* why b 4 */
end as field_1,
dt as field_2,...
获取的所有捣碎
select case /*comment */ when a = 5
then b = 2 else b = 4 /* why b 4 */
end as field_1,
dt as field_2,...
或者类似的规定。
右击 - >脚本视图为 - >改为 - >新的查询窗口。 –
http://sqlblog.com/blogs/aaron_bertrand/archive/2009/10/14/bad-habits-to-kick-using-the-visual-designers.aspx –