Apostrophes in strings
If you need to use an apostrophe inside a Firebird string, you can “escape” the apostrophe character by preceding it with another apostrophe.
For example, this string will give an error:
'Joe's Emporium'
because the parser encounters the apostrophe and interprets the string as 'Joe'
followed by some unknown keywords.To make it a legal string, double the apostrophe character:
'Joe''s Emporium'
Notice that this is two single quotes, not one double-quote.
You can also use the alternative quote string literal, allowing you to embed the quote without escaping:
q'{Joe's Emporium}'