SQL Create Database

How to use Sql Create database correctly? This page will show the basic of creating a database.


Databases range from simple to complex. The simplest are flat-file databases, for example your list of cd collections or friends' phone numbers. All information is just in one table.

Things can get more complex when you need a relational database. With the relational database, you group the information together into certain class(or entity), create relationship between them then create an Entity-Relationship Diagrams(ERDs). There are rules and techniques to design a database, we are not going to discuss them here.

For our example, let us create books collection database

The syntax of Sql Create Database:

CREATE DATABASE   database_name

To create mybooks database, type this command:

CREATE DATABASE   mybooks

Selecting a Database

After we create a database, we usually need to move to it. You need to do that before you create any of its objects

The syntax is:

USE   database_name

You can use that command any time you want to move from one database to another.

So let's select our new database before we create any table:

USE   mybooks

Now you are in mybooks database, we are now going to create some tables using SQL Create Table command.

Quick link. From here, you can learn the following:

Sql Create Table
This Sql Create Table will be used very often throughout the tutorial. It is used to create a table, in our case, mainly to create sample tables.

Sql Alter Table
Used less often, but it is very handy to know this command. With this you can basically edit a table structure.

Sql Drop Table
Used to delete a table, not just the content. This command is also used very often during the tutorial. So, you need to master this too.

Data Retrieval
All you need to know about Sql Select can be found here.

Journey
Buy at AllPosters.com
A bend in the road is not the end of the road... unless you fail to make the turn

Positive Resources

All of us have at least two or three things that excite us. We could talk about these subjects for hours. Good news!. Did you know that Site Built It! can turn this type of deep interest and enthusiasm into a revenue-generating business?

Review some of the Site Build It! case studies and you'll absolutely discover something that ignites more positive ideas into your mind.

SBI! Video Tour


Invest the most
important 30 minutes
you will spend online.

Click, sit back, and
understand why SBI!
makes you succeed.