mySQL在刪除行為上的默認值
Default Behavior
MySQL's default ON DELETE behavior is to enforce referential integrity, preventing any change to the parent table that would break the relationship with child tables.這是通過或限制
Other OptionsMySQL offers additional options to handle ON DELETE events:
SET NULL: Deletes the parent row and sets the foreign key in the child table to NULL,如果未聲明為null。
cascade:刪除父行,並自動刪除子表中的依賴行。
問題:免責聲明: 提供的所有資源部分來自互聯網,如果有侵犯您的版權或其他權益,請說明詳細緣由並提供版權或權益證明然後發到郵箱:[email protected] 我們會在第一時間內為您處理。
Copyright© 2022 湘ICP备2022001581号-3