0
DELETE
    a,b,c
FROM 
sp_movie.movie_db AS a
INNER JOIN sp_movie.movie_time AS b
      ON a.Movie_ID = b.Movie_ID
INNER JOIN sp_movie.movie_time AS c
      ON c.Movie_ID = a.Movie_ID
WHERE 
    a.Movie_ID = 29

を持つ3つのテーブルすべてからすべての行を削除しようとしていますMovie_ID = 29

これも書いてみた DELETE a FROM.....

エラーが発生しました: Error Code: 1451. Cannot delete or update a parent row: a foreign key constraint fails (sp_movie .movie_actor , CONSTRAINT2 FOREIGN KEY (Movie_ID ) REFERENCESmovie_db (Movie_ID) ON DELETE NO ACTION ON UPDATE NO ACTION)

4

2 に答える 2