Jump to content

How to select data from two identical tables?


mameha

Recommended Posts

I have some user records stored in two tables.

 

The table structure is identical.

 

table1 = latest data

table2 = archived data

 

(once a month the latest data is added to the archived data).

 

Question: How to select data from BOTH tables at once?

 

I tried this but it failed:

 

SELECT `lastname` , `firstname` , `email` FROM `table1` , `table2` WHERE `country` = 'CN'

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.