How To Create a DATABASE

To create a database we must need show database because same name can not be allowed in database.
Syntax:
create database database_name;

create

In this image when i create a bank database then it’s show error because bank database is already exists.But when i create a students database it’s not show error because it’s not exists.After creating a students database if we want to store data in there then we must write: use database_name;
then we need to check there is no data inserted(Empty set). In this case simply type: show tables;

If you have confusion that where your creating database then simply type show databases; you get the new database.

create2

[N.B. When we need to see how many data in my databases then we write show databases;
Again if we need to see how many tables in data then write show tables;
So,don’t confused about it]

Leave a comment

Website Powered by WordPress.com.

Up ↑

Design a site like this with WordPress.com
Get started