How to delete rows in tables that contain foreign keys to other tables

前端 未结 5 1382
借酒劲吻你
借酒劲吻你 2020-12-05 00:07

Suppose there is a main table containing a primary key and there is another table which contains a foreign key to this main table. So if we delete the row of main table it w

5条回答
  •  一整个雨季
    2020-12-05 00:28

    Need to set the foreign key option as on delete cascade... in tables which contains foreign key columns.... It need to set at the time of table creation or add later using ALTER table

提交回复
热议问题