How to Create a Database Table With phpMyAdmin

In this tutorial, we値l show you how to create a database table with phpMyAdmin. We値l assume that you are already logged into phpMyAdmin. If you are not logged in just follow the steps in this tutorial to login.

1) First, we値l need to select the database, in this example, we値l use the ultahost_demo database.

2) You値l notice that we have a couple of test tables already created, to create a new database table just enter the name of the table in the 哲ame field and the number of fields you want for this table and click 敵o.

3) We致e created the table 電emo and added two columns (name and phone), now we need to set the details of each field within this new table and select Type of data the column will hold. Some of the most common types are:

  1. INT = INTEGER used to store a number that can be written without a fractional component. (e.g. 2, 10, -44). An integer can be zero, positive, and negative.
  2. CHAR = Characters used to store character string value of fixed length, the maximum number is of characters is 255.
  3. VARCHAR = Variable Length Characters used to store variable length alphanumeric data and can store up to 65,535 characters.
  4. TEXT = used for holding large amounts of text.
  5. DATE = Will only hold dates.
  6. DATETIME = Will hold both a date and a time.

4) We can also define the Length/Values if necessary, the CHAR type will require you to specify the maximum number of characters allowed. All the other fields are optional, however, if you need more detailed information about all the options available you can check the MySQL Reference Manual.

5) When finished, click 鉄ave. A message will appear indicating that your table has been created.

Was this article helpful?

Thanks for your opinion!
Have more questions? Submit a request