[] brackets in sql statements

前端 未结 8 2437
深忆病人
深忆病人 2020-11-28 12:24

What do the brackets do in a sql statement?

For example, in the statement:

insert into table1 ([columnname1], columnname2) values (val1, val2)

8条回答
  •  天涯浪人
    2020-11-28 13:10

    Anything inside the brackets is considered a single identifier (e.g. [test machine]. This can be used to enclose names with spaces or to escape reserve words (e.g. [order], [select], [group]).

提交回复
热议问题