We would like to select players from the ZSC Lions Women’s team in the database.
Your tables: trainer, team, block, player.
First, insert the coaching duo and the team:
trainer (column: name)
Angela Taylor Christine Meier
team (columns: name, age_group, trainer_id)
ZSC Lions Frauen, Aktiv, 1
block (Columns: description, team_id)
1. Linie, 1 2. Linie, 1
Now add five female players – ideally using a single MULTIPLE INSERT.
spieler_in (columns: name, rueckennummer, spielposition, block_id)
('Kira Juodikis', 22, 'Stürmerin', 1), ('Kristi Shashkina', 5, 'Verteidigerin', 1), ('Anja Trummer', 14, 'Stürmerin', 2), ('Isabel Waidacher', 9, 'Stürmerin', 2), ('Fanny Rask', 27, 'Stürmerin', 1);
Try to add a player without a name. Read the error message.
First, use SELECT to check how many rows are affected.