Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Beide Seiten der vorigen Revision Vorhergehende Überarbeitung | |||
| modul:m290_guko:learningunits:lu08:theorie:e_many-to-many [2025/10/26 18:16] – gkoch | modul:m290_guko:learningunits:lu08:theorie:e_many-to-many [2025/10/26 18:18] (aktuell) – gkoch | ||
|---|---|---|---|
| Zeile 40: | Zeile 40: | ||
| CREATE TABLE post_category ( | CREATE TABLE post_category ( | ||
| - | post_id | + | |
| - | category_id INT NOT NULL, | + | category_id INT NOT NULL, |
| - | PRIMARY KEY (post_id, category_id), | + | PRIMARY KEY (post_id, category_id), |
| - | FOREIGN KEY (post_id) REFERENCES posts (post_id) ON DELETE CASCADE ON UPDATE CASCADE, | + | FOREIGN KEY (post_id) REFERENCES posts (post_id) ON DELETE CASCADE ON UPDATE CASCADE, |
| - | FOREIGN KEY (category_id) REFERENCES categories (category_id) ON DELETE CASCADE ON UPDATE CASCADE | + | FOREIGN KEY (category_id) REFERENCES categories (category_id) ON DELETE CASCADE ON UPDATE CASCADE |
| ); | ); | ||
| </ | </ | ||