1

I currently have a mysql table which is reaching the maxint mark with the autoincrement column.

Is it save to change the field type to Bigint without loss of data?

Or do I need to use a duplicate table with a bigint field, copy all data, and then remove the original and rename the copy to be sure I don't lose data?

4

1 に答える 1

3

BIGINT はすべての INT 値を保持できるため、データを失うことなく型変換が可能です。

ALTER TABLE <tbl> CHANGE <col> <col> BIGINT;
于 2013-01-14T13:26:32.103 に答える