Escape Character in SQL Server Ask Question

Escape Character in SQL Server Ask Question

I want to use quotation with escape character. How can I do to avoid the following error when one has a special character?

Unclosed quotation mark after the character string.

ベストアンサー1

You can escape quotation like this:

select 'it''s escaped'

result will be

it's escaped

おすすめ記事