try abc

try abc

  • 1.3k
  • 306
  • 481.8k

Referencing Primary key twice in one table

Jan 30 2008 12:09 AM
Referencing Primary key twice in one table
Is it possible to create 2 foreign keys from the same primary key, both of them in the same table?

This is a simplified version of the tables I want to create:

Supplier Table
-supplier_id(primary key)
-supplier_name

Asset table
-Asset_id
-Supplier_id(foreign key 1)
-ServicedBy_Supplier_id(foreign key 2)

If this is possible how can I make them refer back to the same primary key?
It does not support Cascade delete and update in both the foreign keys ?
What is the solution for this ?
 


Answers (2)