Skip to main content
Version: 2.x(alpha)

CONTINUE statement

The CONTINUE statement can be used to skip an iteration of a loop, like within the FOR statement.

Statement syntax

SurrealQL Syntax
CONTINUE

Example usage

The following query shows example usage of this statement.

-- Set can_vote to true for every person over 18 years old.
FOR $person IN (SELECT id, age FROM person) {
IF ($person.age < 18) {
CONTINUE;
};

UPDATE $person.id SET can_vote = true;
};