MySQL

IntermediateLesson 4 of 1330 min, hands-on

Data Types

Part of the MySQL course

Look back at the products table from the last lesson and you will notice every column had a type: INT, VARCHAR(120), DECIMAL(10, 2). Those were not decoration. The type you pick for a column decides what MySQL will accept, how much space it takes on disk, how it sorts, and sometimes whether your numbers are even correct.

Open the terminal, connect as root (the password is easyenv, as in lesson 02), and give this lesson a fresh database of its own ...

What you'll learn

  • INT and BIGINT
  • DECIMAL vs FLOAT
  • VARCHAR vs TEXT
  • BOOLEAN as TINYINT
  • DATE vs DATETIME vs TIMESTAMP
  • ENUM
  • JSON column

Work through Data Types

Sign in free and open the MySQL course. Work through the lesson, and ask the AI tutor when you get stuck.