1. Computing & Technology

Discuss in my forum

MySQL Tutorial: Create SQL Tables

By , About.com Guide

4 of 4

Using Command Lines
If you prefer you can also run commands from a command line to create a table. A lot of web hosts don't give you shell access to the server anymore, or allow remote access to the MySQL servers. If you want to do it this way you may have to install MySQL locally, or try this nifty web interface. First you will need to login to your MySQL database. If you are unsure how try using this line: mysql -u Username -p Password DbName Then you can run the command:

 CREATE TABLE people (name VARCHAR(30), age INTEGER, height FLOAT, date DATETIME); 

To view what you have just created try typing in:

describe people;

No matter which method you chose to use, you should now have a table setup and ready for us to enter data into.

©2012 About.com. All rights reserved.

A part of The New York Times Company.