Specify foreign key on one column and the value of another column
问题 I have a table ASSETS that has a structure as it is shown below : ---------------------------------------------------- ID (PK) | DESCRIPTION | TYPE | Do- | Do+ | Dx- | Dx+ ---------------------------------------------------- TYPE column has a foreign key , possible values are SECURITY or CURRENCY (i.e. FX ), also I have two more tables : CURRENCIES ( for example , EUR , RUB or USD ) : -------------------------------------------------------- ID (PK)| FROM (FK ASSETS.ID) | TO (FK ASSETS.ID) |