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 the CHAR data type. If the lengths of two values are different, OceanBase Database adds spaces to the end of the shorter value to make their lengths equal before comparing them.
When specifying text literals, the maximum length of a CHAR value is 2000, and the maximum length of a VARCHAR2 value is 32767.
Here are some valid text literals. To include a single quotation mark in a string, you need to add another single quotation mark before it:
'Jackie''s raincoat'
'Hello'
'09-MAR-98'
'Today is a nice day'
