Text literals are strings enclosed in single quotation marks ( ' '). They are used to specify string values in expressions, conditions, SQL functions, and SQL statements.
Text literals have the properties of the CHAR and VARCHAR2 data types.
In expressions and conditions, OceanBase Database treats text literals as CHAR data type values. If the lengths of two values are different, OceanBase Database pads the shorter value with spaces at the end to make their lengths equal before comparing them.
When specifying text literals, the maximum length of CHAR data type values is 2000, and the maximum length of VARCHAR2 data type values is 32767.
The following are some valid text literals. To represent a single quotation mark in a string, you need to insert another single quotation mark before it:
'Jackie''s raincoat'
'Hello'
'09-MAR-98'
'Today is a good day'