I can't really figure this out.
Database 2
(ID, name, gender, DOB, state)
(ID, etc, etc)
Now I need a query that gives me the (name, gender, DOB, state
) if database 2 contains the same ID as database 1.
Should I use a innerjoin for this or what?
Thank you.
You have to use a join and calling database name in it :
SELECT t1.ID, name, gender, DOB, state, t2.stuff, t2.stuff2
FROM database1.people t1
LEFT OUTER JOIN database2.offenders t2 ON t1.id=t2.id