pablocattaneo
12/4/2018 - 11:29 AM

How to create a table with a column id that autoincrement itself?

How to create a table with a column id that autoincrement itself? #mysql

Source: https://www.udemy.com/the-ultimate-mysql-bootcamp-go-from-sql-beginner-to-expert/learn/v4/t/lecture/6912306?start=0

CREATE TABLE unique_cats2 (
    cat_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
    name VARCHAR(100),
    age INT
  );