Home Sql Create a database



Create a database
Posted on: September 15, 2007 at 12:00 AM
In this sction, you will learn how to create database.

Create a database

     

In this section, we will teach you to create a database. 

First of all, display all databases by show databases. This helps to find out the existing database. Then create a database using the given syntax and give the suitable name of database.

 

 

 

 

 

CREATE DATABASE database_name;

Then create connection with database. The connection  is included in the names of the database. 

Create a Table: the following query creates a table
CREATE TABLE table_name
(
column_name1 data_type,
.......
)

Yet the table does not have any data. 

In the given example we show the use of the create to make a table email and populate it with the field named LName, FName and email_add.

CREATE TABLE email
(
LName varchar(20),
FName varchar(20),
email_add varchar(40)
)

Related Tags for Create a database:
cdatabasesyntaxtabledatauihelpfinddisplaynameusingthiscreatetabshowdatabasestobasesheitaxsplfirstinasmntoutplaypsstiispestaxaseallmehowssuspatisirlliveaexistingandxissthshostabablexidispfinplndo


More Tutorials from this section

Ask Questions?    Discuss: Create a database   View All Comments

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.