At least in MySQL it is where there is a distinct permission for creating temporary tables but not for modifying them (such as adding keys). :-/ If the only permissions you have are Select and Create Temporary Table, you have to create a temporary table, index it and fill it with data all in one statement.

That said, I am usually willing to explore options that require post-processing of the data. Some database programmers don't like that.

Wade.