mokahola Posted August 22, 2006 Share Posted August 22, 2006 Hi,I have two tables, one for patches and one for mods, I want to merge these into one table. Each has the same structure, as follows:+-----------+-----------+-----------+| name | adddate | views |+-----------+-----------+-----------+|<name> | <date> | <views> ||<name> | <date> | <views> |+-----------+-----------+-----------+Now I want to combine them so that all the information is in one table, so I can order them by the adddate, and that the names of the patches and the names of the mods are in the same [name] column. The same goes for the other columns.I searched the internet and couln't find any thing about it, so maybe it isn't even possible.Thanks in advance.mokahola. Quote Link to comment Share on other sites More sharing options...
ShogunWarrior Posted August 22, 2006 Share Posted August 22, 2006 INSERT INTO table1SELECT *FROM table2Rename table1/table2 appropriately.table2 is the second table you want to merge with table 1.Then empty table2 and delete it. Quote Link to comment Share on other sites More sharing options...
mokahola Posted August 22, 2006 Author Share Posted August 22, 2006 thnx, but I didn't want it in there permenently, but I fond a way:SELECT * FROM modsUNION ALLSELECT * FROM patches ORDER BY adddate 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.