An Engineers Notebook

SQL: What is a quoted Identifier?

Enabling a quoted Identifier allows you to use a word not usually allowd by SQL when placed inside inverted commas. Here is an example.

THIS WILL FAIL, because SELECT is not allowed.

CREATE TABLE SELECT
(
    SelectID int NOT NULL,
)
GO

THIS WILL WORK as quoted identifiers are turned on allowing the use of the term select.

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE “SELECT”
(
    SelectID int NOT NULL,
)

Leave a Reply

Your email address will not be published.