But it seems that at least th Data Type MUST Follow the name of the field … then the order of the others doesn’t matter !! I say that because this worked:
i don’t think so, because it worked fine when i tested it
CREATE TABLE test_foo
( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY
, foo VARCHAR(99)
);
CREATE TABLE test_bar
( id INT PRIMARY KEY AUTO_INCREMENT NOT NULL
, bar VARCHAR(99)
);
you might have something else in your CREATE TABLE statement that we can’t see that’s causing the error
Error 1064 (42000): 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 ‘NOT NULL AUTO_INCREMENT PRIMARY KEY INT, name TEXT, address TEXT) DEFAULT CHARAC’ at line 2
Does that mean It has a specific order that must be followed ? :injured: