
Last chance! 50% off unlimited learning
Sale ends in
dm
to anotherAdd a reference from one table of a dm
to another
cdm_add_fk(dm, table, column, ref_table, check = FALSE)
A dm
object.
A table in the dm
The column of table
which is to become the foreign key column
referencing the primary key of ref_table
.
The table which table
is referencing. This table needs to have
a primary key set.
Boolean, if TRUE
(default), a check is performed, if the values of
column
are a subset of the values of the primary key column of ref_table
.
Other foreign key functions: cdm_enum_fk_candidates
,
cdm_get_all_fks
, cdm_get_fk
,
cdm_has_fk
, cdm_rm_fk