mysql數(shù)據(jù)庫重命名語句分享
更新時(shí)間: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內(nèi)置函數(shù)的實(shí)現(xiàn)示例
mysql內(nèi)置了很多的函數(shù),本文主要介紹了Mysql內(nèi)置函數(shù)的實(shí)現(xiàn)示例,文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧2024-07-07
使用Mysql5.x以上版本出現(xiàn)報(bào)錯(cuò)#1929 Incorrect datetime value: '''''''' f
我的MySQL安裝后,保存刪除表數(shù)據(jù)總是出現(xiàn)#1929 Incorrect datetime value: '' for column 'createtime' 的報(bào)錯(cuò)提醒,導(dǎo)致不能刪除表里數(shù)據(jù)。下面小編給大家分析原因及解決辦法,需要的朋友可以參考下2017-01-01
用percona-toolkit為MySQL收集系統(tǒng)和性能信息的教程
這篇文章主要介紹了用percona-toolkit為MySQL收集系統(tǒng)和性能信息的教程,可以輕松地將服務(wù)器基本信息錄入數(shù)據(jù)庫,需要的朋友可以參考下2015-11-11
MySQL實(shí)現(xiàn)字段或字符串拼接的三種方式總結(jié)
這篇文章主要為大家詳細(xì)介紹了MySQL中實(shí)現(xiàn)字段或字符串拼接的三種方式,文中的示例代碼講解詳細(xì),感興趣的小伙伴可以跟隨小編一起學(xué)習(xí)一下2023-01-01

