Hello all :)

Me and a friend of mine we are working in a project at the moment.

We populate our database each one with his own data but now we need to merge our tables.
The database has the same name in both machines, and also table name.

I dont want to display the date on the browser just by quering the 2 tables, i want to create a new table which it will be the data of the other 2 ones.

For example i have came up to this

Select * FROM kiniseis
UNION ALL
Select * FROM kiniseis1

Somewhere i should put Create but i dont know the right syntax :(
But this is just a query that i dont want to use, i need to have the new table in a "physical" form that can be explored in Mysql Administrator for example.

Can someone pls help me?

Thank you :)

I came up to this

CREATE TABLE kiniseisAll SELECT * FROM (SELECT * FROM kiniseis UNION ALL  SELECT * FROM kiniseis1) AS kiniseisAll

But i can not figure out how to write the correct suntax for the auto increment id in the query :(

Anyone?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.