Rename Database

Rename Database

Rename Database :
We can rename databases by using rename database query. For do this, we must have ALTER and DROP privileges for that database, and the CREATE privilege for the new database. This query create new database first and move tables and triggers from old database to new one.It does not change any account privileges listed in the system tables. It updates only Db column for objects such as stored routines and events.

Syntax :
RENAME DATABASE [db_name] TO [new_db_name];

Example :
RENAME DATABASE wordlisttemp TO wordlist;

Leave a Reply

You must be logged in to post a comment.


All material @ copyrighted by chrisranjana.com. If you want to link to this article you are welcome to do so. Unauthorized publication is strictly prohibited. This developer tutorial website contains articles by Php programmers , Software developers, Mysql programmers and asp c# programmers. This website also contains ajax tutorials and advanced mysql sql stored procedures and functions tutorials and sample codes.