I’m still pretty new to doing this, so I’m not entirely sure it’s possible.
I have two databases and I’d like to run one query pulling from both- locating where
database1.table1.firstname + database1.table1.lastname = database2.table2.name
Is this possible?
I thought I could do something like
SELECT
COALESCE(firstname + ' ' + lastname, firstname, lastname) Name
FROM database1.table1
INNER JOIN database1.table1, database2.table2
WHERE
Name = table2.name;
Is this possible? Or can joins only be performed on tables in the same databases?
Any MySQL query can only be run on the same database, you must perform both queries from separate connections, then merge the data.