MySQL Trigger: Delete From Table AFTER DELETE

后端 未结 3 1539
失恋的感觉
失恋的感觉 2020-12-01 18:17

Scope: Two tables. When a new patron is created, they have some information about them stored into a 2nd table (This was done using a trigger as well, it works as expected)

3条回答
  •  生来不讨喜
    2020-12-01 18:41

    create trigger doct_trigger
    after delete on doctor
    for each row
    delete from patient where patient.PrimaryDoctor_SSN=doctor.SSN ;
    

提交回复
热议问题