开发者

Oracle delete user

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:

  1. Create 3 delete-statements,
  2. Create a cascading delete constraint.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜