All possibles types in a SurrealDB Schemafull table
· 3 min read

SurrealDB is a powerfull database, which 1.0 has been released in 2023. It's a new gen database, which can be schemafull or schemaless. In this article, we will focus on the schemafull part of SurrealDB.
Even if the official SurrealDB documentation is quite complete about SurrealQL language querrying, it lacks a bit of information about the types available in a schemafull table. This article aims to fill this gap.
Reminder about creating a table and field
To create a table in SurrealDB, you need to have previously defined a database and namespace. Then you can create a table with the following command:
DEFINE TABLE product SCHEMAFULL;
Then to define a field in a table, you can use the following command:
DEFINE FIELD my_field ON TABLE product TYPE data_type;
Types available in SurrealDB schemafull table
basic types
Any
DEFINE FIELD my_field ON TABLE product TYPE any;
Booleans
DEFINE FIELD active ON TABLE product TYPE bool;