how to Create, drop and rename of mysql database

how to Create, drop and rename of mysql database

How To Create DATABASE

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;

How To Drop DATABASE

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.

How To Rename 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





Leave a Reply

Related Posts: You may like

Extract Total Number of Image And Missing Alt Attribute using php

How to extract Heading tags using PHP from string

How to remove whitespace from string using php

Remove All Special Characters From String PHP

PHPKIDA Offering Free Tools:

INSTA DOWNLOADER

Download Instagram Videos & Photos.

Download Now

CURRENCY CONVERTER

Real Time Currency Converter

Convert Now

ROBOST.TXT GEN.

Robots.txt File Creater

Create Now

HTML MINIFIER

Compress yout HTML Code

Minify Now

CSS MINIFIER

Compress yout CSS Code

Minify Now

JAVASCRIPT MINIFIER

Compress yout JavaScript Code

Minify Now

Sign up for weekly update

Milkshake is almost ready. If you're interested in testing it out, then sign up below to get exclusive access.