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.

Était-ce utile?

La solution

CREATE PROCEDURE PRO (VAR INT)
mylabel: BEGIN ATOMIC

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

END
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top