db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick Hillegas <Richard.Hille...@Sun.COM>
Subject Re: Checking for integrity in a trigger
Date Mon, 09 Jun 2008 13:34:47 GMT
Hi Bassam,

Derby's trigger syntax is described in the "CREATE TRIGGER statement" 
section of the Derby Reference Manual: 

You may also be able to implement the behavior you need by using a CHECK 
constraint which invokes a function. The function, in turn, can do 
something complicated such as reading other tables. This will work if 
the condition you need to enforce is one which you want to hold true at 
UPDATE time as well as INSERT time.

Hope this helps,

Bassam Jabbour wrote:
> Hi,
> I am trying to set up a trigger in an SQL script that will check for
> some complex integrity constraint on row insertion, but I couldn't get
> it to work neither with IF or WHEN nor with CHECK: I am getting a syntax
> error when loading the script with ij.
> Am I missing something, or is it yet unimplemented in Derby?
> Thanks,

View raw message