Easy Writes & indexes Free

SQL interview question: UPDATE a Text Value

Relabel the Genre

The catalog team decided 'Hard Rock' should be merged into the 'Metal' genre for playlist curation.

Write a single UPDATE statement changing every artist labeled 'Hard Rock' to 'Metal'.

Note: Your change is verified automatically and rolled back afterwards.

This challenge changes data. Your statement runs on a private copy of the database, then we check the resulting table.

Tables

artists 10 rows
  • artist_id integer PK
  • name text
  • genre text
artist_idnamegenre
1The BeatlesRock
2Pink FloydProgressive Rock
3Michael JacksonPop

Keep going