How do I escape a single quote in SQL Server?

前端 未结 13 1866
情话喂你
情话喂你 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:21

    Just insert a ' before anything to be inserted. It will be like a escape character in sqlServer

    Example: When you have a field as, I'm fine. you can do: UPDATE my_table SET row ='I''m fine.';

提交回复
热议问题