Reputation: 31709
I'm trying to create a new column as boolean type, but I can't find it in the list..any help?
5.2.37 and ubuntu 11.10
Upvotes: 15
Views: 57950
Reputation: 71
Skip the workbench and use the command line
alter table my_table add column my_column BOOLEAN;
Upvotes: 7
Reputation: 82765
To Create a Boolean Column in Table with default false
ALTER TABLE table_name ADD field_name tinyint(1);
if default true
ALTER TABLE table_name ADD field_name tinyint(0);
Upvotes: 0
Reputation: 13275
There is no such thing as a 'boolean' in MySql unfortunately.
I think you need tinyint(1)
.
This question has more: Which MySQL data type to use for storing boolean values
Upvotes: 21