I recently converted an Access database to MySQL. The conversion process did not recognize the Autonumber fields in Access. Can I simply use the ALTER TABLE command to add AUTO_INCREMENT to make it continue incrementing from the last number in the list? Or do I have to go through some other extravagant process? I would recreate the column but in the use of the database over the years not all the numbers are there anymore, many records have been deleted.
And my second question... When I did my conversion many of the columns had spaces in the names. When I use MySQL in Linux to send SQL commands it will not recognize the columns with spaces. If I type
ALTER TABLE tablename ADD "Department #" NOT NULL
I get the error
ERROR 1064: You have an error in your SQL syntax near '"Department #" NOT NULL' at line 1
I've tried using "", '', using "\ " instead of just a space. Is there something I can do short of having to either live with it or change my entire front-end to deal with no spaces?
Oh, one more question. I created a table with two columns, the first is "INT NOT NULL AUTO_INCREMENT" and the second is CHAR(20). When I link the table in MS Access and try to add data I get #Deleted in both columns after I’ve entered data and moved to a new record. If I close the table and open it again the data I entered is there. Anyone know why it's giving me #Deleted?
Thanks for the help.
-Craig
And my second question... When I did my conversion many of the columns had spaces in the names. When I use MySQL in Linux to send SQL commands it will not recognize the columns with spaces. If I type
ALTER TABLE tablename ADD "Department #" NOT NULL
I get the error
ERROR 1064: You have an error in your SQL syntax near '"Department #" NOT NULL' at line 1
I've tried using "", '', using "\ " instead of just a space. Is there something I can do short of having to either live with it or change my entire front-end to deal with no spaces?
Oh, one more question. I created a table with two columns, the first is "INT NOT NULL AUTO_INCREMENT" and the second is CHAR(20). When I link the table in MS Access and try to add data I get #Deleted in both columns after I’ve entered data and moved to a new record. If I close the table and open it again the data I entered is there. Anyone know why it's giving me #Deleted?
Thanks for the help.
-Craig