Does the text query editor in MS SQL Server 2008 R2 have a SQL formatt开发者_如何转开发er (like many other code editors for other languages, including VB and C# in Visual Studio)?
I want to go from this:
SELECT foo frOm bar where bar.arg > 5
to this:
SELECT foo
FROM bar
WHERE bar.arg > 5
you can use this online formatter:
http://sqlserverlearner.com/online-tools/tsql-code-formatter
You can paste your query into a new view definition and that does have a SQL formatter
精彩评论