Jump to content

Archived

This topic is now archived and is closed to further replies.

natalieG

table insert from second table

Recommended Posts

we have two two tables, PASSWORD and TEST. The only difference between the two is that
TEST 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

Share this post


Link to post
Share on other sites
Why not just modify the other table structure instead of moving all the data?

Share this post


Link to post
Share on other sites
in any case you're overlapping the structure you can't insert a row without pindex.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.