Mysql method to re-edit a table: first enter the command describe to view the current data table structure information; then add new field information through the command "alter...add..."; finally use "alter change" Just use the command to modify the field information.
Recommended: "mysql video tutorial"
First enter the command describe data table name to view the current data table Structural information
If you want to add new field information, add it through the command alter...add...
After adding the new field information, check the structure of the data table again. You can see that a new field with the field type date has been added
If you want To modify the existing field information, use the command alter...change..., to modify it
After the modification is completed, check the structure of the data table again, you can see The default value of score has been modified to 0
Use the command insert into and insert information to check whether the information can be entered correctly
View the contents of the data table through the command select, and you can find that the data is correctly entered into the data table
The above is the detailed content of How to re-edit a table in mysql. For more information, please follow other related articles on the PHP Chinese website!