Question · SQL and MySQL course · Module 5: Modifying data (DML)

Changing several columns at once

How do you change several columns at once in a single UPDATE command?

Answer options

  • Write several separate SET clauses one under another
  • Repeat the word UPDATE for each column
  • List them separated by commas in the SET clause: SET miasto = '...', email = '...'
  • It is impossible - UPDATE changes only one column

You can check the correct answer by solving this task in the CodeWorlds game.