On a same note as this, I have a situation
like this in the database I'm transporting to
a microsoft SQL server, however when I try to
add the foreign key to this table I get an error
message.
unid = unique ID field in the table
parentid = field in same table that references unid field.
Statement:
ALTER TABLE CLASSIFICATIE
ADD CONSTRAINT FK_CLASSIFICATIE_parentid FOREIGN KEY (parentid) REFERENCES CLASSIFICATIE(unid)
Error Message:
ALTER TABLE statement conflicted with COLUMN FOREIGN KEY SAME TABLE constraint 'FK_CLASSIFICATIE_parentid'. The conflict occurred in database 'Database', table 'CLASSIFICATIE', column 'unid'.