FuzzDuck
FuzzDuck
Alter database
FuzzDuck
Alter database

Alter database

When setting up a database you might realize midway, that you have come up with the wrong database name. To change the name, you can call the ALTER DATABASE command, take the name of the old database, and give it a new name of your choice.

--- SQL command to rename database ---
ALTER DATABASE oldDatabaseName MODIFY NAME = newDatabaseName;
Ducktown

If we mistakenly had called our database DogTown, instead of DuckTown, we could call the command ALTER DATABASE DogTown MODIFY NAME = DuckTown;. The new name of our database is now DuckTown.

--- SQL command to rename database DogTown to DuckTown ---
ALTER DATABASE DogTown MODIFY NAME = DuckTown;