NOT NULL
keyword after a value when we are creating a table to ensure that when we insert a new row into the table that the data is complete.
If we attempt to put some data containing null or missing values into the table we will return an error and not insert or update the row.
In order to update the column, we must first modify the NULL values to be a non-NULL value that is unique to all other values in the column.
Once the column has been modified we can update the column to not accept NULL values.
DEFAULT
keyword.
UNIQUE
keyword when we are creating the table, or we can alter the table such that it will not allow duplicate values for a given table.
We can find this information in PGAdmin:
Once we have the name of the constrain we can use the Query Tool to remove the constraint using the DROP CONSTRAINT
:
CHECK
keyword when we are creating the table, or the ADD CHECK
keyword if we are modifying the table.
>, <, >=, <=, =
If we are adding multiple columns we will place the CHECK on it’s own line.