I have a table named school, but its there in two databases D1
AND D2
. First 10 records are there in D1 database and the rest 10 records in Database D2.
There is a field name name
. How can i combine table school
from 2 databases.
since in query I have a portion like
where institution.iname=school.name ,
here since school is fetched from 2 databases ,How can I achieve this. THanks
Check this out. Great stuff. Good luck!
SELECT d1.* FROM database1.school d1 LEFT JOIN database2.school d2 ON d1.name=d2.name WHERE d2.name IS NOT NULL;