Question · SQL and MySQL course · Module 4: Creating tables (DDL)

How DEFAULT works

What does the DEFAULT constraint do on a column, e.g. dostepna BOOLEAN DEFAULT TRUE?

Answer options

  • It blocks the ability to save any value
  • It removes the column after a row is saved
  • It gives the column a default value when we do not provide our own while saving
  • It sorts the column in ascending order

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