Tutorials

SQL Database


SQL Rename Database


 

RENAME DATABASE is used to rename the existing database name to new database name.

Syntax for Rename database


RENAME DATABASE current_db_name TO new_db_name

Example


RENAME DATABASE tih_database TO tih_db

What above query does?

Above query will rename the database tih_database to tih_db.

 

So this query is useful in case we find out after database creation that name is not suitable and it needs to be changed.

 



Please Share this page
Views : 38