A character string literal is a string of characters enclosed in single quotation marks ( ' ).
To include a single quotation mark in a character-string literal, precede it with an additional single quotation mark. The following FairCom DB SQL examples demonstrate embedding quotation marks in character-string literals:
insert into quote values('unquoted literal');
insert into quote values('''single-quoted literal''');
insert into quote values('"double-quoted literal"');
insert into quote values('O''Hare');
select * from quote;
c1
unquoted literal
'single-quoted literal'
"double-quoted literal"
O'Hare
To insert a character-string literal that spans multiple lines, enclose each line in single quotation marks. The following FairCom DB SQL examples shows this syntax, as well as embedding quotation marks in one of the lines:
insert into quote2 values ('Here''s a very long character string '
'literal that will not fit on a single line.');
1 record inserted.
select * from quote2;
C1
--
Here's a very long character string literal that will not fit on a single line.