However, there is a solution to hand: MySQL allows you to create temporary tables to store data that work in precisely the same manner as normal tables except they are automatically deleted when your connection to the server is closed (or when your script ends).