natalieG Posted June 13, 2006 Share Posted June 13, 2006 we have two two tables, PASSWORD and TEST. The only difference between the two is thatTEST has an auto_increment column named [!--coloro:#FF0000--][span style=\"color:#FF0000\"][!--/coloro--]PINDEX integer auto_increment[!--colorc--][/span][!--/colorc--]. we want to move all the data from PASSWORD to TEST by the following:INSERT INTO TEST SELECT * FROM PASSWORD and we get a mysql error=1136. we then tried:INSERT INTO TEST SELECT REPFIRM,SUPERVISOR,PASSWORD,EMAIL FROM PASSWORD; we get another error number and the mysql monitor says" Doesn't match column at row 1.Is there a way to accomplish this?Thanks,Jennifer Quote Link to comment https://forums.phpfreaks.com/topic/11873-table-insert-from-second-table/ Share on other sites More sharing options...
ober Posted June 13, 2006 Share Posted June 13, 2006 Why not just modify the other table structure instead of moving all the data? Quote Link to comment https://forums.phpfreaks.com/topic/11873-table-insert-from-second-table/#findComment-45052 Share on other sites More sharing options...
joquius Posted June 13, 2006 Share Posted June 13, 2006 in any case you're overlapping the structure you can't insert a row without pindex. Quote Link to comment https://forums.phpfreaks.com/topic/11873-table-insert-from-second-table/#findComment-45056 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.