Skip to content

Operators and functions

View as Markdown

CoraDB provides operators and built-in functions for every data type. The examples on these pages run on the e-commerce sample database or on literal values, and show real results.

Page Contents
Comparison operators =, <=>, <>, <, >, IS [NOT] NULL/TRUE/FALSE
Logical operators AND, OR, XOR, NOT
Arithmetic operators +, -, *, /, DIV, MOD, and arithmetic on dates
Set arithmetic operators Union, difference and intersection of collection values
Statement set operators UNION, DIFFERENCE/EXCEPT, INTERSECTION/INTERSECT of queries
Containment operators SETEQ, SUBSET, SUPERSET and related operators
Conditional expressions ANY/ALL, BETWEEN, EXISTS, IN, IS NULL, LIKE, CASE
List predicates ALL, ANY, NONE, SINGLE over the elements of a list
Page Contents
String functions CONCAT, SUBSTRING, REPLACE, TRIM, LPAD, INSTR, ...
Regular expressions REGEXP, REGEXP_LIKE, REGEXP_REPLACE, REGEXP_SUBSTR, ...
Numeric functions ABS, ROUND, TRUNC, MOD, POWER, RAND, WIDTH_BUCKET, ...
Date/time functions ADD_MONTHS, DATEDIFF, EXTRACT, LAST_DAY, TO_CHAR, time zones, ...
BIT functions BIT_AND, BIT_COUNT, bitwise operators
Type conversion functions CAST, TO_CHAR, TO_DATE, TO_NUMBER, DATE_FORMAT, ...
Aggregate and analytic functions COUNT, SUM, AVG, GROUP_CONCAT, ROW_NUMBER, RANK, LAG, ...
JSON functions JSON_OBJECT, JSON_EXTRACT, JSON_TABLE, ...
Graph functions NODES, RELATIONSHIPS, PATH_SIZE, PATH_COMP, LABEL and the JSON graph functions
List functions Functions on lists and sequences, such as FIRST, LAST, LIST_COMP
Conditional functions COALESCE, DECODE, GREATEST, IF, NVL, NULLIF, ...
LOB functions CHAR_TO_CLOB, CLOB_TO_CHAR, CHAR_TO_BLOB, CLOB_LENGTH, BLOB_LENGTH, CLOB_FROM_FILE, BLOB_FROM_FILE
Click counter functions INCR, DECR
ROWNUM functions ROWNUM, INST_NUM, ORDERBY_NUM, GROUPBY_NUM
Information functions DATABASE, CURRENT_USER, LAST_INSERT_ID, VERSION, LABEL, ...
Encryption functions MD5, SHA1, SHA2
Other functions SLEEP, SYS_GUID

When a function receives an argument that cannot be converted to the type it expects, it returns an error, or NULL if the return_null_on_function_errors parameter is yes.