Temporary Table

This lesson teaches you how to work with temporary tables in MySQL.

We'll cover the following

Temporary Table

MySQL allows us to create temporary tables. Temporary tables are persisted for the duration of the MySQL monitor session and removed once the session is terminated. The user doesn’t need to explicitly clean-up a temporary table. Monitor is the program that displays the MySQL prompt in the terminal.

Syntax

CREATE TEMPORARY TABLE tableName (

col1 <dataType> <Restrictions>,

col2 <dataType> <Restrictions>,

col3 <dataType> <Restrictions>,

<Primary Key or Index definitions>);

Connect to the terminal below by clicking in the widget. Once connected, the command line prompt will show up. Enter or copy and paste the command ./DataJek/Lessons/5lesson.sh and wait for the MySQL prompt to start-up.

Get hands-on with 1400+ tech skills courses.