From the course: Learning phpMyAdmin

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Amending the table structure

Amending the table structure

From the course: Learning phpMyAdmin

Start my 1-month free trial

Amending the table structure

- You can alter the structure of a table at any time, but it's a lot easier to do so before adding any data. That way you don't end up having to edit the contents of possibly hundreds of database records to match your new structure. Let's take a look at the various options for changing the structure of a table. At the same time, we'll add a new column to the table to store a reference to another table that will be added to the database later. I'm working with the up-and-running database, so I'm going to select that from the panel on the left. That opens the Structure tab for the database. There's only one table in the database at the moment, that's cars. And to see the structure of that table, under Actions click the Structure link. And this shows you the structure of the table. All of the table columns are listed in the same order that they appear in the database table, and car_id has got a gold key icon next to it. That indicates that it's the primary key. Older versions of…

Contents