Skip to main content


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

CREATE person SET newsletter = false, interested = true;

Many SurrealDB operators and functions return booleans.

CREATE person SET 
name = "Billy",
name_is_billy = name = "Billy",
name_is_long = string::len(name) > 10;
"id": "person:8ii7v7f54a2m1rla1y6b",
"name": "Billy",
"name_is_billy": true,
"name_is_long": false

Boolean values can be written in anycase.

CREATE person SET 
newsletter = FALSE,
interested = True,
very_interested = trUE;