Quick Tip: Using the Print Statement in SSMS to Check Output Formatting
SQL Server Management Studio (SSMS) is pretty good for developing and checking tabular data; but trying to use the results table to check formatting of text (varchar) output can be challenging. Luckily the T-SQL PRINT statement can help. The PRINT statement sends the formatted output to the Messages tab in SSMS.
See my example below.
Output in the Results Tab table
Output in the Messages Tab
More information on the PRINT Statement can be found below: