Back to top
  Back to overview

INFO statement

The INFO statement.

Statement syntax

INFO FOR [
	KV
	| NS | NAMESPACE
	| DB | DATABASE
	| SCOPE @scope
	| TABLE @table
];

Example usage

The INFO command outputs information about the setup of the SurrealDB system. There are a number of different INFO commands for retrieving the configuration at the different levels of the database.

System information

The top-level KV command returns information regarding the namespaces which exists within the SurrealDB system.

You must be authenticated as a top-level root user to execute this command.
INFO FOR KV;

Namespace information

The NS or NAMESPACE command returns information regarding the logins, tokens, and databases under a specific Namespace.

You must be authenticated as a top-level root user, or a namespace user to execute this command.
You must have a NAMESPACE selected before running this command.
INFO FOR NS;

Database information

The DB or DATABASE command returns information regarding the logins, tokens, and scopes, and tables under a specific Database.

You must be authenticated as a top-level root user, a namespace user, or a database user to execute this command.
You must have a NAMESPACE and a DATABASE selected before running this command.
INFO FOR DB;

Scope information

The SCOPE command returns information regarding the tokens configured under a specific Scope.

You must be authenticated as a top-level root user, a namespace user, or a database user to execute this command.
You must have a NAMESPACE and a DATABASE selected before running this command.
INFO FOR SCOPE user;

Table information

The TABLE command returns information regarding the events, fields, indexes, and foreign table configurations on a specific Table.

You must be authenticated as a top-level root user, a namespace user, or a database user to execute this command.
You must have a NAMESPACE and a DATABASE selected before running this command.
INFO FOR TABLE user;