CREATE TABLE inventory
(
id INT IDENTITY(1,1) PRIMARY KEY,
product VARCHAR(50) UNIQUE,
quantity INT,
price DECIMAL(18,2)
);
error is
Error Code : 1064
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IDENTITY(1,1) PRIMARY KEY,
product VARCHAR(50) UNIQUE,
quantity INT,
pr' at line 3
This worked. I removed
IDENTITY
. I do not seeIDENTITY
in the create table doc of MySQL.EDIT1 (got that OP's wrong syntax exported from T-SQL)
Ahh I got it... you are taking the SQL from T-SQL? Perhaprs you need auto increment use this