2021年3月11日星期四

Delete rows when there's a constraint?

I want to delete specific data between 10 and 20 in a parent table but it's showing an error because of a foreign key constraint. Is it possible to delete these specific rows? This is what I have:

DELETE FROM Table3  WHERE Cost BETWEEN 10.00 AND 20.00  

I get the error:

The DELETE statement conflicted with the REFERENCE constraint "fk_Table2ToTable3".

https://stackoverflow.com/questions/66592731/delete-rows-when-theres-a-constraint March 12, 2021 at 09:00AM

没有评论:

发表评论