fwabbly Posted May 2, 2008 Share Posted May 2, 2008 I have several databases eg.(db1,db2) each of these databases has an 'assertion' table with 2 fields (id and name). I also have another database which has one 'assertion' table with 3 fields (id, project id, name). What I want to is put all the data from db1,db2,etc and put it into the single assertion table in the other database. The name field from the original databases should just all go into the name field of the new table and the project id field in the new table should be the name of the database that it came from. Im trying to do this with phpMyAdmin but if there is an easier way to do this then im open to suggestions. Please help me! Quote Link to comment Share on other sites More sharing options...
hitman6003 Posted May 3, 2008 Share Posted May 3, 2008 Worth a try: SELECT DATABASE() AS project_id, name FROM db1.assertion, db2.assertion Quote Link to comment 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.