let's say I have 3 tables "Goods", "Orders", "Goods in stock"
In the "Orders" we can only add products from the table "Goods", and in "Goods in stock" only products from "Orders" i.e. GoodsID - the primary key is the Goods table, the Orders table is the GoodsID column — Foreign key references Goods(GoodsID) but you cannot add the GoodsID int FOREIGN KEY REFERENCES ORDERS(GoodsID) Goods on stock table, since foreign key to external key references are not allowed:
key, only on the primary key. How to add the required limit?