Search code examples
mysqlalter

Adding a Boolean column into an existing table


I'm trying to add a boolean column into an existing table

alter table chatuser add activerecord bool;
alter table chatuser add activerecord boolean;

where activerecord is my boolean column

Neither of these queries are working. How can I add a boolean column to an existing table?


Solution

  • You have to define what you add - a column:

    alter table chatuser  add column activerecord bool;