To store a temporary result set you can use a special type of table i.e. called MySQL temporary table. To keep temporary data, the temporary tables could be very useful in some cases. When the current client session terminates, the temporary tables is deleted.
This is useful for stored procedures, join query etc. Temporary tables were added in MySQL version 3.23.
CREATE TEMPORARY TABLE temp_user SELECT * FROM user u INNER JOIN result r ON u.user_id = r.user_id GROUP BY u.user_id;
Read Also: MySQL GROUP_CONCAT() maximum length
Now you can query data from temp_user table by following query:
SELECT * FROM temp_user;
After completing the functionality you can delete the temporary table using:
DROP TEMPORARY TABLE temp_user;
For any types of queries, you can contact us on info[at]namasteui.com.
Introduction: As the chill of winter settles in or a bout of cold weather strikes,…
Nestled along the glittering waterfront of the City of Gold, Dubai Marina beckons to discerning…
When was the last time you heard that a clone app like Gojek could efficiently…
The e-commerce market is growing and evolving at a rapid pace. More and more people…
IplWin stands as a reliable and enthralling platform for Indian punters, offering a captivating blend…
Introduction In today's online age, consumers are constantly bombarded with information. They crave valuable content…