Question · SQL and MySQL course · Module 7: Joining tables (JOIN)

Why qualify the id column

When joining ksiazki and autorzy, why do we write k.id or a.id instead of just id?

Answer options

  • Because the id column exists in both tables - the alias says which one we mean
  • Because MySQL does not recognise a column named id
  • Because id must always be written in uppercase
  • Because without an alias id means the number of rows

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