If we attempt to update the students table and set the gender to be null we will receive the following error. Our view tells us that there are two NOT NULL constraints on the enrolments table. An Oracle table can have one and only one primary key. 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.