From the course: Oracle Database 12c: Basic SQL

Unlock the full course today

Join today to access over 24,400 courses taught by industry experts.

NOT NULL constraints

NOT NULL constraints

- [Instructor] Another type of constraint we can create on our database tables is the not now constraint. Not now enforces that values have to be inserted into a specific column in the table. So for example, note that if I try to insert a new record into our demo table 2, specifying only column one, and let's provide a value of four, so essentially telling Oracle insert a new row, but only specify a value for column one, let's try to insert data into the table and see that I was successful. Selecting data from this table will show me that for my newly inserted row, because I haven't specified a value for column two, it is listed as null, null meaning that no value exists for this column for this row. However, note what will happen if I'll drop this table and recreate it, specifying that column two has a not now constraint on it. So I'll type drop table demo table 2, and recreate my table, but this time specifying…

Contents