Right-aligning numbers in T-SQL
When you output a series of numbers in T-SQL, people often want to right-align the numbers. So instead of numbers that look like this:
![]()
They want an output that looks like this:
![]()
Now the first thing to understand is that this is generally a client-tool or program issue, not a T-SQL issue. I ran these queries in SQL Server Management Studio and it could just as easily have decided to show me numbers right-aligned.
2017-04-09
