当前位置: 移动技术网 > IT编程>数据库>Mysql > mysql数据库重命名语句分享

mysql数据库重命名语句分享

2017年12月12日  | 移动技术网IT编程  | 我要评论

王心刚图片,有什么伤感的歌,欲望三国之独占天下

复制代码 代码如下:

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`;

如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复

相关文章:

验证码:
移动技术网