Enrollments closing soon for Post Graduate Certificate Program in Applied Data Science & AI By IIT Roorkee | 3 Seats Left

  Apply Now

SQL Tutorial

47 / 68

Temporary Tables

  • Used to store temporary data.
  • Table and data are deleted when the current client session terminates.
  • Not listed in the output of SHOW TABLES command.

Example:

create temporary table salessummary (
   -> product_name varchar(50) not null,
   -> total_sales decimal(12,2) not null default 0.00
);

Insert some data and select the same.

Now log out of the session or log back in. Try to select the data. You will see there is no such table or data.


No hints are availble for this assesment

Answer is not availble for this assesment

Loading comments...