86
Views
2
Comments
Delete problem
Discussion

The DELETE statement conflicted with the REFERENCE constraint "OSFRK_OSUSR_9J3_USERMOVIERATING_OSUSR_9J3_MOVIES_MOVIEID". The conflict occurred in database "E1YEHO013", table "dbo.OSUSR_9J3_USERMOVIERATING", column 'MOVIEID'.

The statement has been terminated.


( When I try to Delete In Data in Table but That time this error Show  I can't understand What is this error How can i Solve it)

2021-07-07 13-36-32
Hans Dollen

It seems like you want to delete a Movie(s) Record which has UserMovieRating records. The MovieId attribute in UserMovieRating has the delete role 'Protected'. So when you delete the Movie, while there are UserMovieRatings, the database protects it since UserMovieRatings cannot exists without a Movie.

Before deleting a movie you can remove the UserMovieRating first, or adjust the delete role to e.g. 'Delete'. 

Regards Hans

2026-03-12 06-20-48
KUNDAN CHAUHAN
Champion

Hi Manivel ,

For this we need to change delete rule property of 'MOVIEID'  from protect  to Delete 

Thanks

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.