Subject Re: [firebird-support] RI using triggers
Author Dimitry Sibiryakov
On 6 Apr 2006 at 9:24, Nols Smit wrote:

>Is there a way I can modify this trigger so the user can get an
>indication which records are using the primary key of table UPDATERS
>as a foreign key?
>
>Something like
>
> if (exists(Select Updater_ID from Addresses where Updater_ID =
> Old.id)) then
> exception Code_ID 'Updater_ID in use in table Addresses, ID = ' ||
> Addresses.ID;

This is exactly the way. May be cast of ID to string is
necessary...
BTW, do you know that RI on triggers is not as reliable as built-
in?

--
SY, Dimitry Sibiryakov.