CREATE TABLE onscreen( id int(2) not null AUTO_INCREMENT, subject varchar(100) not null, content varchar(100) not null, date datetime not null );
Advertisement
Answer
The entire error message is:
Incorrect table definition; there can be only one auto column and it must be defined as a key
This is clear enough: MySQL requires that you define the auto-increment column as a primary key:
CREATE TABLE onscreen( id int(2) not null AUTO_INCREMENT primary key, --> here subject varchar(100) not null, content varchar(100) not null, date datetime not null )