Skip to main content
Version: 2.x(alpha)

Arrays

Similar to Object-based Record IDs, records in SurrealDB can store arrays of values, with no limit to the depth of the arrays. Arrays can store any value stored within them, and can store different value types within the same array.

CREATE person SET results = [
{ score: 76, date: "2017-06-18T08:00:00Z", name: "Algorithmics" },
{ score: 83, date: "2018-03-21T08:00:00Z", name: "Concurrent Programming" },
{ score: 69, date: "2018-09-17T08:00:00Z", name: "Advanced Computer Science 101" },
{ score: 73, date: "2019-04-20T08:00:00Z", name: "Distributed Databases" },
];