How do I escape a single quote in SQL Server?
Asked 07 September, 2021
Viewed 989 times
  • 57
Votes

I am trying to insert some text data into a table in SQL Server 9.

The text includes a single quote '.

How do I escape that?

I tried using two single quotes, but it threw me some errors.

eg. insert into my_table values('hi, my name''s tim.');

14 Answer