Skip to main content
Version: 1.x

SHOW statement

The SHOW statement is used to replay changes made to a table that has a Change Feed defined on it.

Requirements

Statement syntax

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

Note: The timestamp declared after SINCE 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.

Example usage

Basic usage

The following example shows usage of the SHOW statement.

From the example above, defining a CHANGEFEED on multiple tables still feeds their changes into a single database-wide changefeed. As a result, the SHOW CHANGES FOR TABLE reading SINCE 1 LIMIT 10; query above for the reading table does not show changes for versionstamp 4 and 5, which pertain to changes for the cat table.