Creating tables in a database with phpMyAdmin

This tutorial is going to teach you how to create a table in a database with phpMyAdmin. We are going to assume you are already logged into phpMyAdmin and are on the main screen. For the purpose of this tutorial, we are going to create a table in a database that has no tables at this time.

Let's start by selecting the database in the blue section that needs a table. Click on it and in the right hand window a panel will open to create a new table. There is a blank box and you need to enter a name for the new table, then in the next box enter the number of fields this new table is going to have. When you are ready, click go.

Now a new set of boxes will open. These are the blank fields for your new table. You need to enter the details of each field within the new table in the first column.

In the second column you select the type of entry such as interger, decimal or text etc.

The third column is for the length of the entry or how many characters long. You may also want to select a certain field to be primary key. That is one that will be automatically filled in (auto_increment) when new entries are added to the table. This is often an id field which auto-populates with an id number. To make it primary key, select the first icon after the extra box and mark the radio button. The icon is a page with a key in front of it. Finish entering names and information for the rest of your fields.

For example, if you were going to make one field "Name", that would be a Char for type (character) and you would want to make sure you left enough length for any name that might be entered so length might be something like 100. Telephone in the field would again be a Char type and you would want to make the length about 50. When you are done, click on the save button.

The screen will now show you the table you have created and the SQL query. In the blue window the table will now be listed under the database.

For additional assistance, contact us by submitting a support ticket.

Was this answer helpful?

Add to Favourites Add to Favourites

Print this Article Print this Article

Quick Navigation

Client Login:



Remember Me