In my application,i am allowing a user select as many records as possible which are then run through some tests to mark some records to leave out when adding the selected records to the final destination.
To do that,i am creating a temporary table and then inserting the table with the user selection.The problem is,i need to pass the name of the temporary table to the stored procedure that processes the incoming selections.
I have tried this
SELECT *
FROM information_schema.TABLES
WHERE TABLE_SCHEMA = SCHEMA()
ORDER BY CREATE_TIME DESC
LIMIT 1;
but this does not show temporary tables.In addition to showing the last created temporary table, will need to know the last created table by client connection just as how the last_insert_id()
works.
How can i get the last created temp table?.