mysql數(shù)據(jù)庫重命名語句分享
更新時間:2014年01月15日 10:15:58 作者:
這篇文章主要介紹了mysql數(shù)據(jù)庫重命名語句救命示例,語句中的數(shù)據(jù)庫表前綴換成自己的就可以了,大家參考使用吧
復(fù)制代碼 代碼如下:
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`;
相關(guān)文章
mysql查詢過去24小時內(nèi)每小時數(shù)據(jù)量的方法(精確到分鐘)
我們經(jīng)常遇到類似這樣的需求,查詢最近N秒、N分鐘、N小時的數(shù)據(jù)及N天的數(shù)據(jù),下面這篇文章主要給大家介紹了關(guān)于mysql查詢過去24小時內(nèi)每小時數(shù)據(jù)量(精確到分鐘)的相關(guān)資料,需要的朋友可以參考下2023-03-03Mysql查詢?nèi)掌趖imestamp格式的數(shù)據(jù)實現(xiàn)
本文主要介紹了Mysql查詢?nèi)掌趖imestamp格式的數(shù)據(jù)實現(xiàn),文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧2023-01-01mysql 使用profiling和explain查詢語句性能解析
MySQL 查詢 Profile 可以告訴你每個查詢花費了多長時間,使用了多少資源,執(zhí)行了哪些操作等,這篇文章主要介紹了mysql 使用profiling和explain查詢語句性能解析,需要的朋友可以參考下2024-02-02阿里云centos7安裝mysql8.0.22的詳細(xì)教程
這篇文章主要介紹了阿里云centos7安裝mysql8.0.22的詳細(xì)教程,本文給大家介紹的非常詳細(xì),對大家的學(xué)習(xí)或工作具有一定的參考借鑒價值,需要的朋友可以參考下2020-11-11