Modify the type of Columns with data online. First, create the table structure. when creating the table, modify the attribute of the corresponding column to insert into t_hp_room_type_2 select * From t_hp_room_type rename t_hp_room_type to role; rename failed to t_hp_room_type; failed, the name of the table referenced in the son table has also passed,
The newly created table is not referenced by the original son. This is a mistake. When using rename, you must first check whether it is the lowest-level table, that is to say, there are no other tables for reference. Here, there are some tables that directly affect business error reporting. ========================================================== ========== The following method is used for select. floor from t_hp_room_type A where. floor is not null alter table t_hp_room_type add column floor22 nvarchar2 (50) Update Character Set floor22 = floor alter table comment drop column flooralter table t_hp_room_type rename column floor22 to floor supplement: Number (8, 2) 6 digits before the decimal point, and 2 digits after the decimal point can only be an integer.