I have exported a table from Access 2000 through the ODBC driver to a
database on MySQL 3.23.49.
Here is a DESC of the table called v7_emp.
+--------------+------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+--------------+------------+------+-----+---------+-------+
| emp-num | int(11) | YES | | NULL | |
| emp-code | text | YES | | NULL | |
| emp-name | text | YES | | NULL | |
| emp-addr1 | text | YES | | NULL | |
| emp-addr2 | text | YES | | NULL | |
| emp-city | text | YES | | NULL | |
| emp-state | text | YES | | NULL | |
| emp-zip | text | YES | | NULL | |
I can do a SELECT * FROM v7_emp
But if I do a
SELECT emp-num from v7_emp;
I get this error.
ERROR 1054: Unknown column 'emp' in 'field list'
I tried this on another table that does not have a '-' dash and it works
fine. Does MySQL not allow '-' in table names. The manual says it can use
any characters.
Is there a work-around?