mysql數據庫,億級別數據量,修改表結構中的字段類型

直接改,彷佛不太可行。 不如根據原來的表結構以及你要改的字段類型建立一個新的表: 原表爲t, 新表爲t2 1. create table t2(col1,....colN)其中包括你修正之後的某字段 2. insert into t2 select * from t 3. 將原表重命名備份:    rename t to t_orig; 4. 將新表重命名爲原表    rename t2 to t
相關文章
相關標籤/搜索