The square brackets qualify the text within as a column name. They are required if someone, against recommendation, creates a column name the same as a reserved word. For example, if you have a column named Date
, the following will error:
SELECT t.Date FROM Table1 t
In this case, you would need to qualify the column name with square brackets:
SELECT t.[Date] FROM Table1 t
It is HIGHLY recommended to just avoid using reserved words as column names. Additionally, if you want to alias a column name with spaces in the alias, square brackets are required:
SELECT t.MyDate AS [Invoice Date] FROM Table1 t
The *
is the MS Access wildcard for the LIKE clause. It’s worth noting that Microsoft SQL Server uses the %
as the wildcard.
1
solved Explanation of SQL table syntax for Microsoft Access DB [closed]