I have two identical tables in two different DBs. In the one I will be adding data, once all finished the I need will copy all that data to the other db.table. Later on I want to run a query to see if there has been any additions to the first table. Comparing the two tables seems to me the way to go. I am trying to catch someone adding data to the first table. I kinda have a query but it doesn't show the "New" additions to the first table which are not in the second table.
This code shows all the entries in the first table, even though there is a different entry than in the second table.
Help??
Thanks
Code:
select id, user, description,tech
from (
select id, user, description, tech
from test.devices
union all
select id, user, description, tech
from test1.devices)
temp
group by id, user, description,tech
having count(*)>1
This code shows all the entries in the first table, even though there is a different entry than in the second table.
Help??
Thanks