Put in order · SQL and MySQL course · Module 9: Indexes and normalization

A foreign key with ON DELETE CASCADE

Arrange the lines of the command that adds a foreign key with a cascading delete rule (as we write them in the editor):

Items to put in order

  • ADD FOREIGN KEY (autor_id) REFERENCES autorzy(id)
  • ON DELETE CASCADE;
  • ALTER TABLE ksiazki

You can check the correct answer by solving this task in the CodeWorlds game.