I was trying to check the data types of each column.
I have tried the code below.
use AdventureWorks2014;
exec sp_columns Person;
However, the result return something like this.
PS: I am using AdventureWorks
sample database.
There are 3 options available for the Query Results
Results to Text Ctrl + T
Results to Grid Ctrl + D
Results to File Ctrl + Shift + F
Currently your results are showing in Text mode. Changing it to Grid mode, you need to press Ctrl + D or simply select the option as in the screenshot below:
More over, if you are regularly using the sp_columns
to get the column details, you can add it as keyboard shortcut by Tools -> Options -> Environment -> Keyboard -> Query Shortcuts
.
In the Options
you can place the sp_columns
against the not reserved columns. For an example, I placed it against the Ctrl + 3.
So the next time when you type the tablename in the query analyzer and Press Ctrl + D then Ctrl + 3, you will get your expected result.