Skip to main content
Version: 1.2.x

SHOW

SHOW statement

The SHOW statement can be used to replay changes made to the table.

Requirements

Statement syntax

SurrealQL Syntax
SHOW CHANGES FOR TABLE @tableName [SINCE "@timestamp"] [LIMIT @number]

Example usage

Basic usage

The following expression shows usage of Show statement.

-- Define the change feed
DEFINE TABLE reading CHANGEFEED 1d;

-- Create some records in the reading table
CREATE reading set story = "Once upon a time";
CREATE reading set story = "there was a database";

-- Replay changes to the reading table
SHOW CHANGES FOR TABLE reading SINCE "2023-09-07T01:23:52Z" LIMIT 10;

Note: SINCE <time> needs to be after the time the CHANGEFEED was defined. Also, When defining a CHANGEFEED on a table, it implicitly creates a CHANGEFEED on the database