I need realistic examples for Temporary Tables
CREATE GLOBAL TEMPORARY TABLE table_name
(column1 datatype1 [DEFAULT expression] [, ......])
ON COMMIT PRESERVE ROWS;
as data exists only for the duration of a transaction or session.
the same TEMPORARY TABLE has different data for different sessions or users , data are available only for its session or user.
what are the benefits of TEMPORARY TABLES ?
and in case of applications, why do we have to use it & how?