Board index » delphi » Table reference of foreign key

Table reference of foreign key

Does anybody know how i can determine which table & field a foreign key is pointing at?

I think i have to use one of the system tables like rdb$ref_constraint but i can't figure it out...

Thanx

 

Re:Table reference of foreign key


Hi Peter,

A FK is pointing to a particular index. The index name is system defined and
is the InterBase part of implementing a Unique or Primary Key constraint.
With that index, you can browse RDB$INDEX_SEGMENTS and see what fields
belong to it. The FK is pointing to these fields.

--
Martijn Tonies
InterBase Workbench - the developer tool for InterBase and Firebird
http://www.interbaseworkbench.com

Upscene Productions
http://www.upscene.com

"This is an object-oriented system.
If we change anything, the users object."

Quote
"Peter Schout" <pcsch...@hotmail.com> wrote in message

news:3c3061cb$1_2@dnews...
Quote

> Does anybody know how i can determine which table & field a foreign key is
pointing at?

> I think i have to use one of the system tables like rdb$ref_constraint but

i can't figure it out...
Quote

> Thanx

Other Threads