• KWymore (3/29/2013)


    Outside of a hierarchy example, I can't think of when you would have a table foreign key reference to itself.

    A piece of machinery that is no longer available because it has been superseded by a different piece of machinery, something like

    create table MachineryParts(

    PartID int identity not null primary key,

    PartDescription nvarchar(100) not null,

    IsAvailable bit not null,

    ReplacedByPartID int constraint fkMachineryPartsReplacement foreign key references MachineryParts

    )