What is the use of the square brackets [] in sql statements?

I’ve noticed that Visual Studio 2008 is placing square brackets around column names in sql. Do the brackets offer any advantage? When I hand code T-SQL I’ve never bothered with them.

Example:

Visual Studio:

SELECT [column1], [column2] etc...

My own way:

SELECT column1, column2 etc...

10 Answers
10

Leave a Comment