How to escape two single quotes in DB2?

前端 未结 2 989
孤街浪徒
孤街浪徒 2021-01-27 07:55

E.g: Code=\'\'. If I use Code =\'\'\'\', in the result I\'m getting only one quote.

2条回答
  •  一向
    一向 (楼主)
    2021-01-27 08:23

    Keep the current start and end quotes. Then double each quote supposed to be a part of the string value.

    Code = ''''''
    

    Or you can perhaps use a Unicode string literal:

    Code = U&'\0027\0027'
    

提交回复
热议问题