I have such table:
users: id PK . . .
workers: id PK user_id (FK to users) . . .
evaluations: id PK worker_id (FK to workers) . . .
And now I want to delete user. When I delete user then worker also should be delet开发者_运维技巧ed. How can I do this?
You have 2 options:
- Create 3 delete-statements,
- Create a cascading delete constraint.
精彩评论