A string literal is a sequence of zero or more characters enclosed within single quotation marks.

The following are examples of string literals:

'Hello, world!'
'10-NOV-91'
'He said, "Take it or leave it."'
'$1,000,000'

PL/SQL is case-sensitive within string literals. For example, PL/SQL considers the following literals to be different:

'baker'
'Baker'

To represent an apostrophe within a string, you can use two single quotation marks, which is not the same as writing one double quotation mark:

v := 'I''m a string, you''re a string.'

The two consecutive quotation marks are then interpreted as an individual single quotation mark when processed by the SQL parser.

As of Oracle Database 10.2, you can also use the following notation to define your own delimiter characters for the literal. You choose a character (such as ! in the example below), prefix it with q' and then do not need to escape other single quotation marks inside the pair of literals:

v := q'!I'm a string, you're a string.!';

Do not use alternative delimiters (q' quotes) when you form literals concatenated with dynamic SQL.