Subject Re: [firebird-support] sql to check if a row has been used in related tables?
Author Svein Erling Tysvaer
Is it really impossible, Martijn? I thought most things were possible
with Firebird through combining querying system tables and using execute
statement in a stored procedure.

Sure, most of us never need/want to do anyting like this (I, for one,
have never been in a situation where this could be of much help - after
all, Firebird do allow the foreing key to prevent deletion), but it
would not surprise me if that would be something that some people could
want to implement (e.g. I could imagine the guy that wrote the wonderful
DB Workbench to have customers asking for such features).

Set

Martijn Tonies wrote:
>> I have a table called Item with keyfield itemno, and there are many
>> tables use the itemno as foreign key, is there a generic way to check
>> if a certain itemno already exists in one of related tables? Thanks.
>
> No.
>
> Martijn Tonies
> Database Workbench - development tool for Firebird and more!
> Upscene Productions
> http://www.upscene.com
> My thoughts:
> http://blog.upscene.com/martijn/
> Database development questions? Check the forum!
> http://www.databasedevelopmentforum.com