Escape Character in SQL Server

前端 未结 9 1437
时光取名叫无心
时光取名叫无心 2020-11-29 03:22

I want to use quotation with escape character. How can I do?

I have received error in SQL Server

Unclosed quotation mark after the character strin

9条回答
  •  青春惊慌失措
    2020-11-29 03:59

    WHERE username LIKE '%[_]d';            -- @Lasse solution
    WHERE username LIKE '%$_d' ESCAPE '$';
    WHERE username LIKE '%^_d' ESCAPE '^';
    

    FROM: SQL Server Escape an Underscore

提交回复
热议问题