From the course: Learning phpMyAdmin

Unlock the full course today

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

Copying a column definition to another table with central columns

Copying a column definition to another table with central columns

From the course: Learning phpMyAdmin

Start my 1-month free trial

Copying a column definition to another table with central columns

- Central columns is a phpMyAdmin feature that makes it easy to copy a column definition to another table. This can be useful when defining tables linked by a foreign key. It's available only in phpMyAdmin 4.3 and later and it requires configuration storage to have been setup as described in chapter two. We're working with the up_and_running database so let's expand that in the panel on the left. We've got just that one table, cars, select that and then select the Structure tab at the top. This displays the structure of the cars table. This second column, make_id, will store the primary key of another table as a foreign key. We need to create that other table but before doing so, let's add this column to the database's central columns. There are several ways of doing that. One is if I go along this row and then open More, Add to central columns is there at the bottom. This More drop-down is created only if you're working on a small monitor or the browser window is narrow. On a larger…

Contents