Introduction
Foreign keys
Multicolumn foreign keys
Updates and deletes
21. Database behavior with CASCADE - Updating rows
Revision

Instruction

Okay, we've got the CASCADE option set, now let's see how it works!

Exercise

Let's see what happens in the table project when we update an id in the table employee. Take the employee with id 2 and change the id to 20.

Stuck? Here's a hint!

Type

UPDATE employee SET id = 20 WHERE id = 2;

Console

Code editor

Result

TableConsole