In our current database, We have a lot of tables without a comment on the column. We would like to add comments to columns, but
ALTER TABLE `user` CHANGE `id` `id` INT( 11 ) COMMENT 'id of user'
will change the column data schema,too.
We are afraid that with so many changes, a mistake would be made and the data schema would be accidentally altered.
What would be the best way to insert the comments with no change to the data schema ?
This script creates the required ALTER TABLE statements. After running it, change the comments descriptions, then run those ALTER TABLE statements.
https://stackoverflow.com/a/17791564/378779
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With