Constraints

Lesson 8
Author : Afrixi
Last Updated : December, 2017


Table of Content

Code

CopyCREATE TABLE student (
  student_id INT PRIMARY KEY AUTO_INCREMENT,
  name VARCHAR(40) NOT NULL,
  -- name VARCHAR(40) UNIQUE,
  major VARCHAR(40) DEFAULT 'undecided',
);