filmov
tv
MySQL - CREATE Database Command in Terminal - Console [ SHOW SELECT DROP USE ]
![preview_player](https://i.ytimg.com/vi/tdBa1XIaC70/maxresdefault.jpg)
Показать описание
In this tutorial, the self-taught developer explains how to create, drop, select, show, and use databases on a MySQL server using on the terminal.
It probably one of the simplest commands to know in the MySQL syntax, and also one of the least used commands.
I am how often is it that you decide to create a database.
So you can create a database, by simply giving the command:
CREATE DATABASE database_name;
Then to use the database:
USE database_name;
To delete the database, you should issue the following command:
DROP DATABASE database_name;
By aware, that this deletes all tables with it, therefore if you have data in some tables which you need then, make certain to back up this data prior to dropping the database,
You can always, tell which database you are currently using, by issuing the command:
SELECT DATABASE();
This will list out the one single database which you have selected or are using.
If you haven't selected a database to use, then it will display NULL
You can get a list of all databases on this one server by issuing the command:
SHOW DATABASES;
This will then list out all databases on the server.
#SelfTaughtDeveloper #DavidThorn
It probably one of the simplest commands to know in the MySQL syntax, and also one of the least used commands.
I am how often is it that you decide to create a database.
So you can create a database, by simply giving the command:
CREATE DATABASE database_name;
Then to use the database:
USE database_name;
To delete the database, you should issue the following command:
DROP DATABASE database_name;
By aware, that this deletes all tables with it, therefore if you have data in some tables which you need then, make certain to back up this data prior to dropping the database,
You can always, tell which database you are currently using, by issuing the command:
SELECT DATABASE();
This will list out the one single database which you have selected or are using.
If you haven't selected a database to use, then it will display NULL
You can get a list of all databases on this one server by issuing the command:
SHOW DATABASES;
This will then list out all databases on the server.
#SelfTaughtDeveloper #DavidThorn
Комментарии