SurrealDB Docs Logo

Enter a search query

.select()

Selects all records in a table, or a specific record, from the database.

Method Syntax
db.select(thing)

Arguments

ArgumentsDescription
thing required

The table name or a RecordID to select.

Example usage

# Select all records from a table db.select('person') # Select a specific record from a table await db.select(RecordID('person', 'h5wxrf2ewk8xjxosxtyc'))

Translated query

This function will run the following query in the database.

SELECT * FROM $thing;