开发者

Oracle delete user

开发者 https://www.devze.com 2022-12-12 19:44 出处:网络
I have such table: users: id PK . . . workers: id PK user_id (FK to users) . . . evaluations: id PK worker_id (FK to workers)

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

精彩评论

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