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

Checking before DELETE

Which habit lets you safely check which rows will be changed BEFORE you run an UPDATE or DELETE?

Answer options

  • First run a SELECT with the same WHERE and see the matched rows
  • Run the command without WHERE and check the effects
  • Drop the whole table and recreate it from scratch
  • Never use the WHERE clause

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