添加过一次sql失败了之后,再执行该sql,就报错了,无法添加字段
sql:
ALTER TABLE bms_c
.room
ADD COLUMN live_id
INT(11) DEFAULT '0'
错误信息:
Query : alter table bms_c
.room
add column live_id
int(11) DEFAULT '0'
Error Code : 1050
Table 'bms_c/#sql-ib1551' already exists
Execution Time : 00:00:00:000
Transfer Time : 00:00:00:000
Total Time : 00:00:00:000
alter table table name add field name int default 0
//Since it is an int type, why does it default to 0 for the string when you add it?
alter table
will create a new empty table, fill it with data, and then delete the original table.Judging from your prompt, it may be that the sql execution failed last time, but the temporary table created was retained