Changing table structure
When developing an application, requirements about data structure often change because of new or modified needs. Developers must accommodate these changes through judicious table structure editing. This section explores the subject of changing the structure of tables. Specifically, it shows how to add a column to an existing table and edit the attributes of a column. We then build on these notions to introduce more specialized column types, and to explain their handling through phpMyAdmin. Finally, we will cover the topic of index management.
Adding a column
Suppose that we need a new column to store a book's language and, by default, the books on which we keep data are written in English. We call the column language, which will contain code composed of two characters (en by default).
In the Structure page of the Table
view for the book
table, we can find the Add column dialog. Here, we specify how many new columns we want, and where they will go.
The positions of the...