Create a basic MySQL table

Creating tables in databases is the  first step to store your data

To create a table you must describe the columns and their atributes. We will create a table to hold contact information with four columns: contact_id, name, email, and birthdate.
contact_id column =  integer number that is 20 decimal places long ( it is created with an INT(20) datatype).
name column holds the full name of a contact, which we  will will set be no longer than 50 characters long, so the datatype is VARCHAR(50).
birthdate will be stored as a DATE datatype.

The following SQL command will create a table called mycontact as described above:

CREATE TABLE mycontact (
contact_id INT(20),
name VARCHAR(50),
birthdate DATE,

You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

AddThis Social Bookmark Button

Leave a Reply

To prove that you're not a bot, enter this code
Anti-Spam Image