Newer Version Available

This content describes an older version of this product. View Latest

Reserved Characters

The single quote (’) and backslash (\) characters are reserved in SOQL queries and must be preceded by a backslash to be properly interpreted.

Reserved characters, if specified in a SELECT clause as a literal string (between single quotes), must be escaped (preceded by the backslash \ character) to be properly interpreted. An error occurs if you do not precede reserved characters with a backslash.

The following characters are reserved:
1' (single quote)
2\ (backslash)

For example, use the following SELECT statement to query the Account.Name field for “Bob's BBQ”:

1SELECT Id
2FROM Account
3WHERE Name = 'Bob\'s BBQ'