Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

constraints

  • NOT NULL
  • UNIQUE
  • PRIMARY KEY
CREATE TABLE car (
    owner_name    VARCHAR(100),
    color         VARCHAR(20) NOT NULL,
    license_plate VARCHAR(20) UNIQUE,
    motor_number  VARCHAR(20) UNIQUE NOT NULL
);
INSERT INTO car (owner_name, color, license_plate, motor_number)
       VALUES ("Foo Bar", "Blue", "12-345-67", "DFAFD3243EGGER");
INSERT INTO car (color, motor_number)
       VALUES ("Yellow", "GFAFD3243EGGER");
INSERT INTO car (color, motor_number)
       VALUES ("White", "GFAFD3243EGGER");