| Author |
Copy data from one table to another
|
Jeppe Sommer
Ranch Hand
Joined: Jan 07, 2004
Posts: 263
|
|
Hello, I want to copy some data from one table (orderpaymentno) to another table (order) in mySQL. The two tables are not identical. I also have to predefine some data in the new table. This is the SQL query I have tried out but it doesn�t work. Can anyone help me correcting the SQL query ? [ February 19, 2007: Message edited by: Jeppe Fjord ]
|
 |
Jan Cumps
Bartender
Joined: Dec 20, 2006
Posts: 2350
|
|
In the INSERT INTO clause, you can only put column names. If the values 2, 2, 'Afdeling (I understand that!)' and 2 need to be fixed values, then you must put their column name in the INSERT INTO clause, and their value in the SELECT clause: Regards, Jan
|
OCUP UML fundamental
ITIL foundation
|
 |
Jeppe Sommer
Ranch Hand
Joined: Jan 07, 2004
Posts: 263
|
|
|
Thank you :-)
|
 |
 |
|
|
subject: Copy data from one table to another
|
|
|