Creating tables in a database with phpMyAdmin

phpMyAdmin series

2. Creating tables in a database with phpMyAdmin

This tutorial assumes you've already logged in to phpMyAdmin

Now let's learn how to create a table within a database

Select thedemo1234_members database here
FutureHosting Best Hosting in Ireland - Creating tables in a database with phpMyAdmin

Enter a Name for our new table
FutureHosting Best Hosting in Ireland - Creating tables in a database with phpMyAdmin

Then enter the number of fields this new table is to have. Click Go
FutureHosting Best Hosting in Ireland - Creating tables in a database with phpMyAdmin

Now enter the details of each field within the new table
FutureHosting Best Hosting in Ireland - Creating tables in a database with phpMyAdmin

We also want this first field to be the Primary key that will be automatically filled in (auto_increment) when new entries are added to the table

The first field will be called id, and it will be an integer that's 4 characters in length
FutureHosting Best Hosting in Ireland - Creating tables in a database with phpMyAdmin

Selecting this option makes the id field the Primary key in the table
FutureHosting Best Hosting in Ireland - Creating tables in a database with phpMyAdmin

The remaining fields will be CHAR (character) fields. Be sure the length is set long enough to accomodate the fields
FutureHosting Best Hosting in Ireland - Creating tables in a database with phpMyAdmin

When finished, click Save
FutureHosting Best Hosting in Ireland - Creating tables in a database with phpMyAdmin

That's it! Our new table (details) has been successfully created within our database(demo1234_members) as indicated here
FutureHosting Best Hosting in Ireland - Creating tables in a database with phpMyAdmin

This is the end of the tutorial. You now know how to create new tables within a database using phpMyAdmin

Ця відповідь Вам допомогла?

 Роздрукувати цю статтю

Також прочитайте

Renaming database tables with phpMyAdmin

phpMyAdmin series 10. Renaming database tables with phpMyAdmin This tutorial assumes you've...

Searching through a database with phpMyAdmin

phpMyAdmin series 11. Searching through a database with phpMyAdmin This tutorial assumes you've...

Running SQL queries on a database with phpMyAdmin

phpMyAdmin series 9. Running SQL queries on a database with phpMyAdmin This tutorial assumes...

Copying a database table with phpMyAdmin

phpMyAdmin series 12. Copying a database table with phpMyAdmin This tutorial assumes you've...

Exporting databases and tables with phpMyAdmin

phpMyAdmin series 7. Exporting databases and tables with phpMyAdmin This tutorial assumes...