Okay, I admit it was a major mistake in my project. During the trial run of this project, I modified the length and value of the database field twice, in order not to affect the existing data, I can only find another way to dynamically add, delete, modify, and add column fields? 1 altertableTableNamedropcolumnfield
Okay, I admit it was a major mistake in my project. During the trial run of this project, I modified the length and value of the database field twice, in order not to affect the existing data, I can only find another way to dynamically add, delete, modify, and add column fields? 1 alter table TableName drop column field
Okay, I admit it was a major mistake in my project. During the trial run of this project, I modified the length and value of the database field twice, in order not to affect the existing data, I can only find another way to dynamically add, delete, and modify columns.
Dynamically add column Fields
?
1
Alter table TableName drop column field_id;
Dynamically delete column Fields
?
1
Alert TABLE table_name change old_field_name new_field_name field_type;
Dynamic Modification of column Fields
?
1
Alert TABLE table_name change old_field_name new_field_name field_type;
Errors and what I want to say, I have written them in this blog (MySQL dynamically modifies the varchar length). You can also see that, in fact, we do not advocate this approach.