NexusDB Manual V3 > SQL Reference > SQL Statements > Control Statements
Repeat the execution until the condition is true.
Syntax
<repeat statement> ::=
Usage
The REPEAT statement is used to specify a repeated iteration of the statement block until the search condition is true.
See also: WHILE statement
Examples
DROP FUNCTION IF EXISTS dummyFunc; CREATE FUNCTION dummyFunc( p1 INTEGER ) RETURNS INTEGER BEGIN DECLARE v1, v2 INTEGER; SET v1 = p1; SET v2 = p1 * 10; REPEAT SET v1 = v1 + p1; UNTIL v1 = v2 END REPEAT; RETURN v1; END; SELECT dummyFunc( 10 ) FROM #dummy;
Conformance
|
© Nexus Database Systems Pty Ltd.