HiveBrain v1.2.0
Get Started
← Back to all entries
snippetsqlModerate

How can we add BOOLEAN datatype in mysql query browser?

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
candatatypebooleanquerybrowsermysqlhowadd

Problem

I am trying to add a BOOLEAN column using EDIT TABLE in mysql workbench, but it automatically changes to TINYINT on applying changes.

How can I get the column to be BOOLEAN?

Solution

BOOL and BOOLEAN are synonyms of TINYINT in MySQL. See MySQL docs: Numeric Type Overview

You probably want to use the BIT datatype.

Context

StackExchange Database Administrators Q#17867, answer score: 10

Revisions (0)

No revisions yet.