Question · SQL and MySQL course · Module 8: Subqueries

EXISTS vs IN

Why can EXISTS be faster than IN with a correlated subquery?

Answer options

  • Because EXISTS never uses a subquery
  • Because IN does not work with tables, but EXISTS does
  • Because the Library can stop searching the moment it finds the first matching row
  • Because EXISTS automatically creates an index on every column

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