Subject | Re: [firebird-support] Find column to foreign key constraint |
---|---|
Author | Martijn Tonies |
Post date | 2007-06-15T13:08:10Z |
Hi,
RDB$INDEX_SEGMENTS as well.
Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, NexusDB, Oracle &
MS SQL Server
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com
> I'm trying to select all column that contain aHave a look at RDB$REF_CONSTRAINTS, RDB$INDICES and
> foreign key constraint.
>
> I know how to select all FKs and their tablenames
> using the following SQL
>
> select
> c.rdb$constraint_name,
> c.rdb$relation_name
> from
> rdb$relation_constraints c
> where
> c.rdb$constraint_type = 'FOREIGN KEY'
>
> But how can I find the column name the FK is on?
>
> I tried to join with RDB$DEPENDENCIES without success.
RDB$INDEX_SEGMENTS as well.
Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, NexusDB, Oracle &
MS SQL Server
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com