ON DELETE CASCADE—When a record is deleted from the parent table, all records in the child table with matching foreign key values are also deleted.
ON DELETE CASCADE —当一条记录从父表中删除时,子表中的所有记录以及匹配的外键值都全部被删除。
When an ON delete CASCADE rule is active, all records in the child table with matching foreign key values are deleted when a record is deleted from the parent table.
当ONDELETE CASCADE规则被激活时,当一条记录从父表中删除时,子表中的所有记录以及匹配的外键值都被删除。
Note that the tag's cascade attribute is set to none. That's because we don't want to delete products from the catalog when we delete an order.
这里的标签中的cadcade属性设置为none,这是因为我们在删掉一个订单信息时,不想连订单里的产品信息一并删掉。
Note that the tag's cascade attribute is set to none. That's because we don't want to delete products from the catalog when we delete an order.
这里的标签中的cadcade属性设置为none,这是因为我们在删掉一个订单信息时,不想连订单里的产品信息一并删掉。
应用推荐