When you create a T-SQL script with lengthy T-SQL code, you can only choose one of two methods: either use a horizontal scroll bar or create a newline character on a different point, so that the line of code is easy to read without using the scroll bar. Using scrollbars or having to add line breaks takes time and does not focus on coding. It would be great if there was an automatic line wrapping or something like that. What are some of the ways in SQL Server Management Studio to deal with automatic wrapping?
As with many new features in SSMs, Microsoft has also solved the problem of automatic wrapping. You can easily enable this feature in the SSMs Query window as long as you follow the steps below to start it.
Select "Tools" from the SSMs menu, then select "Options"
Figure 1
In the Options window, select All Languages on the left. The right side of the setting is a word wrap option, which is unrestricted by default, as follows:
Figure 2
Select the check box "wrap line", which will make the wrap available in your query window. Another option under Wrap is the show visual glyphs for word wrap option, which can be applied if the visible options in each row are checked.
Figure