我想将列的名称和类型从 更改BIT(1)
为INT(1)
。
我正在使用 MySQL 工作台。
我试过这个:
ALTER TABLE table_name ADD new_column_name INT(1)
update table_name
set new_column_name = convert(INT(1), old_column_name)
ALTER TABLE table_name DROP COLUMN old_column_name
但我收到了这个错误
You have an error in your SQL syntax; check the manual that corresponds to your
MySQL server version for the right syntax to use near 'INT(1), old_column_name)'