Is it possible to create table on mysql with multi auto_increment in one table. I want to make a table like this:
ID | FILE_ID |
0 | 0 |
1 | 1 |
so when i execute query on PHP like "insert into MYTABLE (ID, FILE_ID) values (null,null)" the field ID and FILE_ID will have the same value.
here is my sql command to create table (but still doesn't work):
create table MYTABLE(ID INT not null auto_increment, FILE_ID int not null auto_increment, primary key(ID, FILE_ID));
the error message is : ERROR 1075: Incorrect table definition; There can only be one auto column and it must be defined as a key
Is there any idea how to handle this problem?..thanks alot
ID | FILE_ID |
0 | 0 |
1 | 1 |
so when i execute query on PHP like "insert into MYTABLE (ID, FILE_ID) values (null,null)" the field ID and FILE_ID will have the same value.
here is my sql command to create table (but still doesn't work):
create table MYTABLE(ID INT not null auto_increment, FILE_ID int not null auto_increment, primary key(ID, FILE_ID));
the error message is : ERROR 1075: Incorrect table definition; There can only be one auto column and it must be defined as a key
Is there any idea how to handle this problem?..thanks alot