A primary key allows only one row to exist in the table with the particular value in the column. We can create a primary key for a table when we create the table or it can be added to the table after creation by using the alter table statement. Lets see the structure of our inmates table. As you can see our inmates table has a constraint type of 'P' for primary key. Don't worry if you find that confusing, here is an example.
Lets see the structure of the escapees table.
As you can see the escapees table now has a primary key. We altered the table after we created it to add the primary key. We are now going to alter the escapees table to add a foreign key. The serialno column value must exist in the serialno column in the inmates table. If we look at the structure of the table escapees there doesn't appear to be any change.