更新时间:2022-06-13 10:19:28
我的建议,如果是空表或不是很大的情况,将create语句导出为.sql文件,按照你的方式重写希望.如果您有任何现有数据,也请执行相同操作,即导出插入语句(我建议在单独的文件中执行此操作作为创建语句).最后删除表,先执行create语句再插入.
My suggestion if it is the case that the table is empty or not very very big is to export the create statements as a .sql file, rewrite them as you wish. Also do the same if you have any existing data, i.e. export insert statements (I recommend doing this in a separate file as the create statements). Finally, drop the table and execute first create statement and then inserts.
您可以使用 mysqldump
命令,包含在您的 MySQL 安装中,或者您也可以安装 MySQL Workbench,这是一个免费的图形工具,它也以非常可定制的方式包含此选项,而无需寻找特定的命令选项.
You can use for that either mysqldump
command, included in your MySQL installation or you can also install MySQL Workbench, which is a free graphical tool that includes also this option in a very customisable way without having to look for specific command options.
为什么MYSQL timestamp取值范围是 1970-01-01 00:00:00 到 2038-01-19 3:14:07
JDBC连接mysql,TOMCAT错误: Cannot convert value '0000-00-00 00:00:00' from column 10 to TIMESTAMP
mysql解决Value ‘0000-00-00 00:00:00’ can not be represented as java.sql.Timestamp
mysql解决Value ‘0000-00-00 00:00:00’ can not be represented as java.sql.Timestamp