First published on WeChat: SQL Database Operations and Maintenance
Link to original article:/s?__biz=MzI1NTQyNzg3MQ==&mid=2247486480&idx=1&sn=cca66eae221e0e32721e9b72fd537ae7&chksm=ea375860dd40d1762517cb6a79144dda3248b31350d845d385c90687c95417b51060ff4e5169&token=1175589249&lang=zh_CN#rd
The differences between alter, update, and modify are: different modifications, different declarations, and different executions.
I. Modifications are different
1. alter: alter modifies the data structure of the table (modify is a usage of alter).
2、update:update modifies the data content of the table.
3, modify: modify modify the field type and length, that is, modify the attributes of the field, modify the field type and length.
II. Differences in statements
1. alter: alter is used when declaring a modified database.
2、update: update is used when declaring a modified table.
3, modify: modify in the declaration of the modified file to use.
III. Different implementation
1. alter: alter takes effect when the execution of the command is completed.
2、update:update to execute the "commit" statement after the command will take effect.
3、modify:modify execution of the command to complete that will take effect.