Back to top
Documentation SurrealQL Statements CONTINUE statement

CONTINUE statement

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

Statement 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;
};