SQL CREATE Database
This statement is used to create a new database in the SQL.
CREATE database "DatabaseName";
DatabaseName – It can be anything i.e. combination of alphanumericals, alphabets, undrscore, hypens etc.
Example: below query will create a new database with the name “tutorialmines”.
CREATE database tutorialmines;
To Check for your database in sql, use the below command :
It will list all the databases in your sql.
| Database |
| information_schema |
| cdcol |
| contact_all |
| dreammarine_live |
| mysql |
| performance_schema |
| phpmyadmin |
| tutorialmines |
| webauth |
9 rows in set (0.00 sec)
Why there is a need for new Database ?
- Whenever you get any new project, then creating a new database is your first step.
- You should give it a logical name rather than any thing. This will help you in memorizing which database is used for which project, Hence
- It saves time, in searching files for the name of database used in your project.
- Your programming standards are maintained.
- Build good programming habits etc.
Now lets move to next step of How to Use/Select the database.