M
mik
I realise this is the wrong place to post, but i can't
find an equivalent newsgroup for sql.
My query is simple. Please help!
i'm trying to create a table in a database. It needs a
primary key and the primary key should increment.
i've written:
CREATE TABLE animals
(
Id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
Name VARCHAR(30) NOT NULL
);
but get this error:
Incorrect syntax near 'AUTO_INCREMENT'.
What am i doing wrong?
find an equivalent newsgroup for sql.
My query is simple. Please help!
i'm trying to create a table in a database. It needs a
primary key and the primary key should increment.
i've written:
CREATE TABLE animals
(
Id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
Name VARCHAR(30) NOT NULL
);
but get this error:
Incorrect syntax near 'AUTO_INCREMENT'.
What am i doing wrong?