Zhang Yu <[EMAIL PROTECTED]> wrote:
> 
> 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?
> 

What version of MySQL do you use? Forked fine for me:

mysql> create table t1 (`id #` int(11), `First Name`
    -> varchar(20) );
Query OK, 0 rows affected (0.00 sec)

mysql> show create table t1\G
*************************** 1. row ***************************
       Table: t1
Create Table: CREATE TABLE `t1` (
  `id #` int(11) default NULL,
  `First Name` varchar(20) default NULL
) TYPE=MyISAM
1 row in set (0.00 sec)
           


-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Victoria Reznichenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
       <___/   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