How to add tables to a database in phpMyAdmin
This article demonstrates how easy it is to add a variety of tables to your MySQL database in phpMyAdmin.
- Begin by accessing phpMyAdmin via cPanel or Plesk.
- Select the Database you wish to work with.
- Inside the Structure tab, below the list of tables (if there's an existing table), navigate to the Create Table Section.
- On the Create Table section, enter the Table name and the number of columns for the table you are creating.
- Click on the Go button to proceed to the next screen.
- Define the column(s) by entering the following information:
- Name the Column.
- Select the Type of data the column will hold. Some common types include:
- INT = Integer (a number without a decimal point)
- CHAR = Characters (can hold text up to a specific length)
- VARCHAR = Variable Length Characters (a text field that is not a fixed-width).
- TEXT = For holding large amounts of text.
- DATE = Can only hold dates.
- DATETIME = Can hold both a date and a time.
- (See the MySQL Data Types article for more options.)
- Define the Length/Values if required. For example, the CHAR type will require you to specify the maximum number of characters allowed.
- The other fields are optional.
- Click on Save when you are finished defining your columns.
A message indicating your table has been created will appear, and your new table will now appear on the list of tables in the database. You can click on the table to see the columns that were created for that table.