欢迎来到代码驿站!

Mysql

当前位置:首页 > 数据库 > Mysql

mysql数据库重命名语句分享

时间:2020-10-10 11:46:25|栏目:Mysql|点击:
复制代码 代码如下:

CREATE DATABASE `ct` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
            RENAME TABLE `51cola`.`commentmeta`
                  TO `ct`.`commentmeta`;
            RENAME TABLE `51cola`.`comments`
                  TO `ct`.`comments`;
            RENAME TABLE `51cola`.`customcontactforms_fields`
                  TO `ct`.`customcontactforms_fields`;
            RENAME TABLE `51cola`.`customcontactforms_field_options`
                  TO `ct`.`customcontactforms_field_options`;
            RENAME TABLE `51cola`.`customcontactforms_forms`
                  TO `ct`.`customcontactforms_forms`;
            RENAME TABLE `51cola`.`customcontactforms_styles`
                  TO `ct`.`customcontactforms_styles`;
            RENAME TABLE `51cola`.`customcontactforms_user_data`
                  TO `ct`.`customcontactforms_user_data`;
            RENAME TABLE `51cola`.`links`
                  TO `ct`.`links`;
            RENAME TABLE `51cola`.`options`
                  TO `ct`.`options`;
            RENAME TABLE `51cola`.`postmeta`
                  TO `ct`.`postmeta`;
            RENAME TABLE `51cola`.`posts`
                  TO `ct`.`posts`;
            RENAME TABLE `51cola`.`terms`
                  TO `ct`.`terms`;
            RENAME TABLE `51cola`.`term_relationships`
                  TO `ct`.`term_relationships`;
            RENAME TABLE `51cola`.`term_taxonomy`
                  TO `ct`.`term_taxonomy`;
            RENAME TABLE `51cola`.`usermeta`
                  TO `ct`.`usermeta`;
            RENAME TABLE `51cola`.`users`
                  TO `ct`.`users`;
DROP DATABASE `51cola`;

上一篇:MySql 错误Incorrect string value for column

栏    目:Mysql

下一篇:MySQL 5.5 range分区增加删除处理的方法示例

本文标题:mysql数据库重命名语句分享

本文地址:http://www.codeinn.net/misctech/9329.html

推荐教程

广告投放 | 联系我们 | 版权申明

重要申明:本站所有的文章、图片、评论等,均由网友发表或上传并维护或收集自网络,属个人行为,与本站立场无关。

如果侵犯了您的权利,请与我们联系,我们将在24小时内进行处理、任何非本站因素导致的法律后果,本站均不负任何责任。

联系QQ:914707363 | 邮箱:codeinn#126.com(#换成@)

Copyright © 2020 代码驿站 版权所有