BOOLEAN or TINYINT confusion

MySQL does not have internal boolean data type. It uses the smallest integer data type – TINYINT.

The BOOLEAN and BOOL are equivalents of TINYINT(1), because they are synonyms.

Try to create this table –

CREATE TABLE table1 (
  column1 BOOLEAN DEFAULT NULL
);

Then run SHOW CREATE TABLE, you will get this output –

CREATE TABLE `table1` (
  `column1` tinyint(1) DEFAULT NULL
)

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)