How do I escape a single quote in SQL Server?

前端 未结 13 1865
情话喂你
情话喂你 2020-11-21 07:01

I\'m trying to insert some text data into a table in SQL Server 9.

The text includes a single quote(\').

How do I escape that?

13条回答
  •  一向
    一向 (楼主)
    2020-11-21 07:40

    Double quotes option helped me

    SET QUOTED_IDENTIFIER OFF;
    insert into my_table values("hi, my name's tim.");
    SET QUOTED_IDENTIFIER ON;
    

提交回复
热议问题