Column constraints - NOT NULL and UNIQUE
54.6
Exercise

Combining constraints

Write a set of SQL statements together to:

  1. create a new table teachers with the following columns, data types and constraints.

    column data type constraint
    id INTEGER UNIQUE
    name TEXT UNIQUE, NOT NULL
    age INTEGER NOT NULL
  2. add these record rows to the created table teachers

    id (INTEGER) name (TEXT) age (INTEGER)
    1 May 32