Skip to main content

String literals

Standard string literals

A string literal is a sequence of characters enclosed within single quotes (’). For example, 'Database' is a string literal. To include a single-quote character within a string literal, you can use two consecutive single quotes. For example, 'Stream processing''s advantages' is a valid string literal that incorporates a single-quote character.

String literals with C-style escapes

String literals with C-style escapes use escape sequences to represent special characters within a string, just as in the C programming language. These literals are constructed by prepending the letter e to the string literal. For example, e'abc\n\tdef'. The following escape sequences are supported:

Numeric literals

RisingWave supports expressing numeric literals in various number systems, including decimal (base 10), hexadecimal (base 16), octal (base 8), and binary (base 2). Here are some examples:
Numeric literals in different bases provide you with flexibility in choosing the most suitable representation for specific needs.