6.4. Die neue Spalte füllen

Jetzt können wir diese Sätze in SQL-UPDATE-Anweisungen umwandeln:

UPDATE film_tabelle SET kategorie = 'Drama' where drama = 'W';
				UPDATE film_tabelle SET kategorie = 'Comedy' where comedy = 'W';
				UPDATE film_tabelle SET kategorie = 'Action' where action = 'W';
				UPDATE film_tabelle SET kategorie = 'Horror' where schocker = 'W';
3/7/2009UPDATE film_tabelle SET kategorie = 'SciFi' where scifi = 'W';
				UPDATE film_tabelle SET kategorie = 'Familie' where ki_fi = 'W';
				UPDATE film_tabelle SET kategorie = 'Familie' where zeichen = 'W' AND fsk = 'OA';
				UPDATE film_tabelle SET kategorie = 'Versch' where zeichen = 'W' AND fsk <> 'OA';

fsk ist ungleich 'OA'.

Spitzen Sie Ihren Bleistift

Füllen Sie die Kategorienwerte für die Filme ...

Get SQL von Kopf bis Fuß now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.