Is there any way to name the complete select as a table? I will try to explain what I am trying to do. I have this
SELECT
*
FROM
`Databse1`.`table1`
JOIN
`Database2`.`table2`
ON
`table2`.`customerID` = `table1`.`customerID`
WHERE
`table1`.`recordID` IN (1,2,3,4)
I have another table, table3 that has these fields
customerID recordID
the recordID is foreign key to table1. What I want to do is in above query somehow enter customerID so it can get all the recordIDs. Is that possible?