Define keys in temporary table creation
Posted
by
imperium2335
on Stack Overflow
See other posts from Stack Overflow
or by imperium2335
Published on 2012-06-27T15:02:28Z
Indexed on
2012/06/27
15:16 UTC
Read the original article
Hit count: 236
mysql
|temporary-tables
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?
© Stack Overflow or respective owner