At 20:43 -0700 4/17/04, Zhang Yu wrote:
Deal all,

I am migrating an old Access database to MySQL. After
migration, we'll keep using Access forms as front end,
and MySQL as database.

I experienced a strange problem when creating table
with a column name "id #", which is used by many
queries in Access. My command is like this:
create table t1 (`id #` int(11), `First Name`
varchard(20) );
I get this error:ERROR 1064: You have an error in your
SQL syntax near '' at line 1

Once I substituted # to ! or @, the command worked
fine.

Is there any constraints with '#' for the column name?

For the server, no. However, the mysql client also parses statements (so that it can find statement delimiters and send statements one by one to the server), and its parser is confused by the construct (and a few others) prior to, um, ... Well, I'm not sure prior to what. Prior for 4.1, I believe. I know that the statement you show above works in 4.1.2. Or at least it works when you spell "varchard" correctly. :-)


-- Paul DuBois, MySQL Documentation Team Madison, Wisconsin, USA MySQL AB, www.mysql.com

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to