The SQL CREATE DATABASE statement is used by a developer to create a database.
Let’s see the Example of CREATE SQL DATABASE:
CREATE DATABASE DataBaseName;
SQL DROP statement is used By Developers to delete or remove the database.
If you want to delete or drop an existing database in a SQL than you can use SQL DROP DATABASE statement.
Let’s see the example of SQL DROP DATABASE:
DROP DATABASE DataBaseName;
If you delete or drop the database, all the tables and views will also be deleted. So be careful while drop Your SQL database.
Sometimes you need to change the name of your database because of the original name was not more relevant to the data. Or, you just want to give a temporary name to that data for easy to remember.
SQL RENAME DATABASE statement is used to change the name of a database.
Let’s see the example of SQL Rename DATABASE:
RENAME DATABASE old_db_name TO new_db_name;
You Can Also use following command to change name of your database.
ALTER DATABASE old_name MODIFY NAME = new_name
My name is Mukesh Jakhar and I am a Web Application Developer and Software Developer, currently living in Jaipur, India. I have a Master of Computer Application in Computer Science from JNU Jaipur University. I loves to write on technology and programming topics. Apart from this, I love to travel and enjoy the beauty of nature.