Is there any way to alter the column width of a resultset in SQL Server 2005 Management Studio?
I have a column which contains a sentence, which gets cut off although there is screen space.
| foo | foo2 | description | | foo | foo2 | description | |--------------------------| TO |----------------------------------| | x | yz | An Exampl.. | | x | yz | An Example sentence |
I would like to be able to set the column size via code so this change migrates to other SSMS instances with the code.
Default Display A NUMBER column's width equals the width of the heading or the width of the FORMAT plus one space for the sign, whichever is greater. If you do not explicitly use FORMAT, then the column's width will always be at least the value of SET NUMWIDTH.
From the SSMS Tools menu, choose Options. Then in the search box type 'FON', choose 'Font and Colors' and from the drop down list labeled 'Show settings for : ' choose 'Grid Results'. Enlarge the font size. Restart SSMS and your view will be much better.
Using SQL Server Management StudioExpand Databases, right-click the database to increase, and then click Properties. In Database Properties, select the Files page. To increase the size of an existing file, increase the value in the Initial Size (MB) column for the file.
What you can do is alias the selected field like this:
SELECT name as [name .] FROM ...
The spaces and the dot will expand the column width.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With