Skip to main content

None and null

SurrealDB uses two types called None and Null to represent two different ways in which data may not exist.

None values

Values can be specifically set to NONE in SurrealDB to remove a field from a record.

CREATE person SET children = NONE;

The NONE keyword can be written in anycase.

CREATE person SET children = NONE, siblings = none;

Null values

Values can be specifically set to NULL in SurrealDB to denote a field which is set, but which does not have a value.

CREATE person SET children = NULL;

The NULL keyword can be written in anycase.

CREATE person SET children = NULL, siblings = null;