Skip to content
NEW

Introducing SurrealDB Studio, the new official app of SurrealDB

Learn more

1/5

Course content preview

1: Connecting to a database

The examples in this course are inside mini windows of their own that look like this...

-- Returns a string
"Click on the 'Run Query' button to run this query!";

-- Also returns a string
RETURN
"Results display without needing the RETURN keyword, " +
"but you can add it if you want";


...and this.

"Just don't forget"
"the semicolon between statements"
"or you will get an error."
"Add some semicolons to make these statements work!"


You don't need to install SurrealDB or create your own connection to run any of them.

But you can also run the examples in a more manual way, if you prefer. Here is how to do it.

Previous

Welcome to the Tour of SurrealDB!

Next lesson

2: Creating records

SurrealDB

The unified data layer for AI

Graph, vector, document, and relational in one engine.
Agent Memory that connects and retrieves context wherever your data lives.

Explore with AI

Stay in the loop

Tutorials, AI agent recipes, and product updates, every two weeks.

Independently verified

SOC 2 Type 2

GDPR

Cyber Essentials Plus

ISO 27001

Trust Centre

Copyright © 2026 SurrealDB Ltd. Registered in England and Wales. Company no. 13615201

Registered address: 3rd Floor 1 Ashley Road, Altrincham, Cheshire, WA14 2DT, United Kingdom

Trading address: Huckletree Oxford Circus, 213 Oxford Street, London, W1D 2LG, United Kingdom