Hello, I imported tow tables from an Access database to MySql. Call them table1 and table2. Both tables came with unique identifiers (ID1 for table1 and ID2 for table2)which were generated automatically as a regular integer index(0,1,2...N-1) for an N set of data. I would like to get rid this type of unique identifier.
I created a primary key in table1 called "mainID". I then created a new column in table2 also called mainID which will contain the information of the new primary key which I created. I then issued the following mySql command: update table2 set table2.mainID=table1.mainID where table2.ID1=table1.ID1; I get the following error ERROR 1054 (42S22): Unknown column 'ID1' in 'where clause' Somehow it doesn't recognize any columns from table1. Your help is greatly apreciated... Further explanation for my query: My reasoning for the condition is : for each row in table2 with a certain value for ID1, find the matching value in table1for ID1. Then take the corresponding mainID value on that row and stick it in that row in table2. I hope that was enlightening rather than more confusing. -- -Mahmoud Badreddine -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]