I need to delete the data in an SQL Server table (parent) which has a relationship with another table (child).
I have tried the basic delete query. But it is not working.
DELETE FROM table WHERE ...
It resulted with the below error.
The DELETE statement conflicted with the REFERENCE constraint ...
I want to keep the table's schema. I know that I just need to add some words in the query, I've ever done this previously, but I simply couldn't recall it.