MySQL – fields table is not good idea

Another gotcha. This time with MySQL (4.1). I just have learned that using table named fields is not possible. Why?

mysql> CREATE TABLE fields (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY);
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 
 'fields (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY)' at line 1

It looks like my plan to use field model have failed :))

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.