Coding task · SQL and MySQL course · Module 9: Indexes and normalization

Foreign key for loans

A loan refers to a specific book - a foreign key makes sure that book exists.

Task

Add to the wypozyczenia table a foreign key on the ksiazka_id column that points to the id column in the ksiazki table. Use ALTER TABLE.