SET QUOTED_IDENTIFIER ON

Sometimes we can’t use single quote. For example we want to update a column and our data contain single quote.In such cases we can use double quote instead of single quote if we SET QUOTED_IDENTIFIER ON.Below first query fails.

SET QUOTED_IDENTIFIER OFF
GO

CREATE TABLE "select"
     (
      "id" INT IDENTITY(2,10) PRIMARY KEY
     ,"firstname" NVARCHAR(100) 
     );
GO
SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE "select"
     (
      "id" INT IDENTITY(2,10) PRIMARY KEY
     ,"firstname" NVARCHAR(100) 
     );
GO
Advertisements