numeric column names in mysql?
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.php archive

numeric column names in mysql?

From: <veg_all@yahoo.com>
Date: Mon Mar 13 2006 - 02:57:33 CET

i am trying to create a table with a column name called 2004. But I
keep getting a mysql error? Is there any workaround?

Unable to execute: 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 '2004 TEXT,2004_reference TEXT,2005
TEXT,2005_reference TEXT,200

CREATE TABLE test (id int(6) NOT NULL auto_increment, membership_number
TEXT,first_name TEXT,last_name TEXT,spouse TEXT,phone_priv
TEXT,phone_bus TEXT,address_street TEXT,addr_town TEXT,addr_city
TEXT,membership TEXT,donor TEXT,1998sa TEXT,1999sa TEXT,2000sa
TEXT,200s1 TEXT,2002sa TEXT,2003sa TEXT,2003_reference TEXT,2004
TEXT,2004_reference TEXT,2005 TEXT,2005_reference TEXT,2006
TEXT,2006_reference TEXT, PRIMARY KEY (id),UNIQUE id (id))
Received on Mon May 1 02:32:09 2006