db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Hill <Thomas.K.H...@t-online.de>
Subject trigger calling a procedure
Date Mon, 22 Oct 2012 06:45:01 GMT
Hello,

the Wiki mentions a trigger can also call a procedure rather than scripting the
SQL statement on the create trigger statement. The documentation as far as I can
see does not give an example of that.

Would this be the right syntax?
CREATE TRIGGER "TR_XY"
  AFTER INSERT
  ON "TBL_XY"
  FOR EACH ROW
  CALL PROCEDURE "SP_xy"();
How about passing in parameters? would this change to:
CREATE TRIGGER "TR_XY"
  AFTER INSERT
  ON "TBL_XY"
  FOR EACH ROW
  CALL PROCEDURE "SP_xy"('xyz', 0);

Thanks



Mime
View raw message