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 in to 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. In the right hand window, a panel will open. It is 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, or 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 times 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. This is the end of the tutorial. You now know how to create a table within a database using phpMyAdmin.

Was dit antwoord nuttig?

 Print dit artikel

Lees ook

Deleting tables in a database with phpMyAdmin

This tutorial is to teach you about specific operations in phpMyAdmin. We are going to learn how...

Deleting fields from database tables with phpMyAdmin

This tutorial is going to teach you how to delete fields from database tables using phpMyAdmin....

Exporting databases and tables with phpMyAdmin

This tutorial is to teach you how to export databases and tables with phpMyAdmin. We will assume...

Inserting fields into database tables with phpMyAdmin

This tutorial is going to teach about the program phpMyAdmin, and how to Insert fields into...

How To Create A MySQL Database

Let's learn how to create a MySQL Database. MySQL Databases allow you to store lots of...

Powered by WHMCompleteSolution