Skip to content


Foreign-key columns of a table

Syntax: fkeys x, fkeys[x]

Where x is a table, returns a dictionary that maps foreign-key columns to their tables.

q)f:([x:1 2 3]y:10 20 30)
q)t:([]a:`f$2 2 2;b:0;c:`f$1 1 1)
q)meta t
c| t f a
-| -----
a| i f
b| i
c| i f
q)fkeys t
a| f
c| f

Basics: Metadata