Skip to main content
Version: 1.2.x

Basic types

Basic types

SurrealDB has a large number of simple built-in types. With an advanced type system, SurrealDB enables advanced storage, simplified comparison, complex data structures, and mathematical operations directly within the database.

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;

Booleans

Boolean values can be used to mark whether a field is true or false.

CREATE person SET newsletter = false, interested = true;

Boolean values can be written in anycase.

CREATE person SET newsletter = FALSE, interested = True;