![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I am creating a table with a SELECT statement. CREATE TEMPORARY TABLE XYZ (SELECT A.key AS key, otherfields FROM A JOIN B on A.key = B.key); I want to index the table XYZ on A.key. Is there a way to indicate in the above that I want an index or do I have to do an additional ALTER TABLE XYZ ADD INDEX(key); Thank you, Joe You can state an index and even additional fields in the create |
#3
| |||
| |||
|
|
I am creating a table with a SELECT statement. CREATE TEMPORARY TABLE XYZ (SELECT A.key AS key, otherfields FROM A JOIN B on A.key = B.key); I want to index the table XYZ on A.key. Is there a way to indicate in the above that I want an index or do I have to do an additional ALTER TABLE XYZ ADD INDEX(key); Thank you, Joe |
![]() |
| Thread Tools | |
| Display Modes | |
| |