We would like to enter, amend and delete VBZ tram routes from Zurich in our database.
Your tables: linie, haltestelle, fahrt.
linie (columns: name, betreiber)
Linie 4, VBZ Linie 11, VBZ Linie 8, VBZ
haltestelle (columns: name, ort)
Bellevue, Zürich Rehalp, Zürich Tiefenbrunnen, Zürich Klusplatz, Zürich Zoo, Zürich
fahrt (Columns: datum, abfahrtszeit, preis, linien_id)
('2026-09-22', '07:15:00', 4.60, 1), ('2026-09-22', '07:45:00', 4.60, 1), ('2026-09-22', '08:05:00', 4.60, 2), ('2026-09-22', '08:20:00', 4.60, 3), ('2026-09-22', '08:40:00', 4.60, 2);
Try to add a route without a name. Read the error message.
First, use SELECT to check how many rows are affected by your WHERE condition – this is particularly important if you’re filtering by linien_id, as this may affect several journeys at once.