Question

Is it possible to return from a HSQLDB Stored procedure before reaching its end?

I've tried:

IF (condition) THEN
  RETURN;
END IF;

This doesn't compile. Neither with EXIT or LEAVE instead of RETURN.

Was it helpful?

Solution

CREATE PROCEDURE PRO (VAR INT)
mylabel: BEGIN ATOMIC

  ...
  IF VAR = 3 THEN
   LEAVE mylabel;
  END IF;
  ...

END
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top