Subject | Re: sql to check if a row has been used in related tables? |
---|---|
Author | wang960 |
Post date | 2007-03-26T23:16:14Z |
Any sample that can get me started? I think this kind of sql is very
useful in the application.
--- In firebird-support@yahoogroups.com, "Martijn Tonies"
<m.tonies@...> wrote:
useful in the application.
--- In firebird-support@yahoogroups.com, "Martijn Tonies"
<m.tonies@...> wrote:
>execute
>
>
>
> > Is it really impossible, Martijn? I thought most things were possible
> > with Firebird through combining querying system tables and using
> > statement in a stored procedure.after
>
> well, yes, that's what I was thinking about after replying ;)
>
> 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 -
> > all, Firebird do allow the foreing key to prevent deletion), but itcould
> > would not surprise me if that would be something that some people
> > want to implement (e.g. I could imagine the guy that wrote thewonderful
> > DB Workbench to have customers asking for such features).check
> >
> > 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
> > >> if a certain itemno already exists in one of related tables?Thanks.
> > >
> > > No.
>