Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

mysql dump without the 'INSERT VALUES'

Status
Not open for further replies.

jez

Programmer
Apr 24, 2001
370
VN
I am trying to migrate some data from a database to a copy of itself but with some extra fields in some of the tables.

I want to DUMP the old data and then insert it in the new one.

When using mysqldump i can only do this in the form of
"INSERT INTO table VALUES (list of values)"

What i want to do is have the inserts as
"INSERT INTO table SET field1 = value1, field2 = value2"

That way it does not matter that the 'Column count does not match value count' which is what i get as an error at the moment.

Any one have any idea how i can do this?

Thanks,

Jez
 
I think you can specify a flag for "complete inserts" that way, a column list is output for each INSERT statement.

+++ Despite being wrong in every important aspect, that is a very good analogy +++
Hex (in Darwin's Watch)
 
How are you generating the new data values or are they all have defauts or nulls in your new db?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top