Text literals are strings enclosed in single quotation marks (' '), used to specify string values in expressions, conditions, SQL functions, and SQL statements.
Text literals inherently have the properties of the CHAR and VARCHAR2 data types.
In expressions and conditions, OceanBase Database treats text literals as the CHAR data type. If the lengths of two values differ, the shorter value is padded with spaces at the end to match the length of the longer value before comparison.
When specifying text literals, the maximum length for a CHAR value is 2000, and for a VARCHAR2 value, it is 32767.
Here are some valid text literals. To include a single quotation mark within a string, you need to use two single quotation marks in succession:
'Jackie''s raincoat'
'Hello'
'09-MAR-98'
'Today is a nice day'