Subject | Re: [firebird-support] sql to check if a row has been used in related tables? |
---|---|
Author | Martijn Tonies |
Post date | 2007-03-26T13:03:12Z |
> Is it really impossible, Martijn? I thought most things were possiblewell, yes, that's what I was thinking about after replying ;)
> with Firebird through combining querying system tables and using execute
> statement in a stored procedure.
I guess with execute statement, you could create a dynamic
query with the info from the system tables.
After creating such a procedure, then yes, it would be a more-or-less
generic way of doing this.
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
> 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.