ALTER TABLE address ADD CONSTRAINT FKAddress_Customer FOREIGN KEY ( AddressID ) REFERENCES Customer(AddressID)but I receive the error
Msg 1776, Level 16, State 0, Line 1 There are no primary or candidate keys in the referenced table 'customer' that match the referencing column list in the foreign key 'FKAddress_Customer'. Msg 1750, Level 16, State 0, Line 1 Could not create constraint. See previous errors.the customer AddressID is indexed and not nullable so I don't understand why it doesn't work.