Define keys in temporary table creation
- by imperium2335
How do I define the keys for a temporary table that is being created from a SELECT statement?
I have:
CREATE temporary TABLE _temp_unique_parts_trading
engine=memory AS
(SELECT parts_trading.enquiryref,
sellingcurrency,
jobs.id AS jobID
FROM parts_trading,
jobs
WHERE jobs.enquiryref = parts_trading.enquiryref
GROUP BY parts_trading.enquiryref)
But where do I define the keys?