In my database there two table call sample and sample customer in sample table primary key is sample_Note_no and it is a foreign key in sample_customer table I got same error after I wrote this coding also
ALTER TABLE Sample Customer
ADD CONSTRAINT FK_Sample Customer_Sample
FOREIGN KEY (Sample_NOTE_No)
REFERENCES Sample(Sample_NOTE_No)
ON DELETE CASCADE
GO