Equivalent of MSSQL IDENTITY Column in MySQL

identity, mysql, sql-server, t-sql

Solution

CREATE TABLE Lookups.Gender
(
    GenderID   INT         NOT NULL AUTO_INCREMENT,
    GenderName VARCHAR(32) NOT NULL
);

Problem

What is the equivalent of MSSQL `IDENTITY` Columns in MySQL? How would I create this table in MySQL? ``` CREATE TABLE Lookups.Gender ( GenderID INT IDENTITY(1,1) NOT NULL, GenderName VARCHAR(32) NOT NULL ); ```

Original source

Related problems