Reputation: 105
I have the following value that needs to be assign into string -
ABC'DEFGH
How I can assign the sign of ' into string? example -
str := 'ABC'DEFGH'
Upvotes: 0
Views: 56
Reputation: 23578
You could also use the quoted string: q'<delimiter character><string<closing delimiter character>'
, e.g.:
str := q'{ABC'DEFGH}'
You can use a variety of characters as the quote delimiters. For more information, see the documentation for information on text literals, which includes how to use the q operator.
Upvotes: 4
Reputation:
It's the same as with plain SQL: to escape a single quote, double it.
str := 'ABC''DEFGH';
Upvotes: 4