Foreign Key Referencing Multiple Tables

后端 未结 3 1822
我在风中等你
我在风中等你 2020-12-18 14:45

I have a column with a uniqueidentifier that can potentially reference one of four different tables. I have seen this done in two ways, but both seem like bad practice.

3条回答
  •  醉梦人生
    2020-12-18 15:16

    You could put a trigger on the table and enforce the referential integrity there. I don't think there's a really good out-of-the-box feature to implement this requirement.

提交回复
热议问题