Square braces in SQL Server play a major role in T-SQL programming. When an object name contains a space, special character, etc, the only way to express them is to put them around squre braces. Consider that you want to create a table user master (with spaces between user and master), you can use [user master].
You can also wrap alias names in square braces
The result is
Ok. Now I want to have [74 as column alias. What should I do? I can simply put one more opening square brace like below
which results to
What if I want to have  as column alias? Simply use one more closing square brace. Isn't it? Well the following code
throws this error
Msg 105, Level 15, State 1, Line 1
Unclosed quotation mark after the character string ''.
Ok. Now can you guess the output of the following statement?
The output is
 [[[]]] [[]]
----------- ----------- -----------
1 1 1
Why are there more number of closing braces than the opening braces used in the statement to produce the output that has same number of opening and closing braces?
The answer is that the last sqaure brace indicates the end of the square braces wrapping. Other than the last square brace, every double closing braces is replaced as single closing brace in the output alias names. But for opening braces, the output is one less than the total number. The first opening braces indicates the beginning of the wrapping. So you need to be aware of these when using multiple square braces in the column alias.