Subject Re: [firebird-support] Activate / Inactivate foreign keys?
Author Martijn Tonies
> I wonder if ther is any possibility to turn foreign keys on / off, like a
> trigger, or something like this.

No, there isn't.

> It is because we have an archiver SP, which deletes dozens of records (if
> not thousands), and there are dependencies we have to manage. So to make
> things simple, we delete foreign keys, then make that deletion. After
> we have to make a full database update to restore those foreign keys. Of
> course we are aware that dependent records won't be deleted. If there were
> some way to turn foreign keys on / off, we could save much time with this.

Removing them is the only way.

With regards,

Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, Oracle & MS SQL
Upscene Productions
Database development questions? Check the forum!