Task: define the string
Thomas' brother said: 'I'm the brother of Thomas.'
as a string literal.Pre Oracle 10g solution:
select 'Thomas'' brother said: ''I''m the brother of Thomas.'''Oracle 10g solution:
from dual;
select q'#Thomas' brother said: 'I'm the brother of Thomas.'#'Using the q quotation syntax it is now much easier to define string literals containing single quotes. Instead of the hash symbol in the example, any other symbol that does not appear within the literal can be used (except space, tab, and return). If you use any of "[{<(" for the opening quote delimiter, the according closing bracket "]}>)" must get used.
from dual;
No comments:
Post a Comment