This example from Sybase.com вполне освещая:
Например, выход sp_helpconstraint на столе store_employees в pubs3 похож на:
name defn
--------------------------- --------------------------------
store_empl_stor_i_272004000 store_employees FOREIGN KEY
(stor_id) REFERENCES stores(stor_id)
store_empl_mgr_id_288004057 store_employees FOREIGN KEY
(mgr_id) SELF REFERENCES
store_employees(emp_id)
store_empl_2560039432 UNIQUE INDEX(emp_id) :
NONCLUSTERED, FOREIGN REFERENCE
(3 rows affected)
Total Number of Referential Constraints: 2
Details:
-- Number of references made by this table: 2
-- Number of references to this table: 1
-- Number of self references to this table: 1
Другими словами, store_employees
имеет 2 внешних ключей:
store
, где работник работает
store_employee
с указом этого лица
Обратите внимание, что FK таблицы может указывать на себя.