SHOW TEMP TABLE
Use the SHOW TEMP TABLE command to display all of the temporary tables that currently exist on the system.
Syntax
Syntax for showing all of the existing
temporary tables:
SHOW TEMP TABLE
Input
There are no inputs for the SHOW TEMP TABLE command.
Outputs
The SHOW TEMP TABLE command has
the following outputs:
Output | Description |
---|---|
ERROR: permission denied | You do not have the necessary permission to view the results of this command. |
Privileges
You must be an administrator or must have the Admin privilege to display the temp tables.
Usage
The SHOW TEMP TABLE command shows all the temporary tables that exist on the system.
Sample usage
with output follows.
MYDB.SCH1(USER)=> SHOW TEMP TABLE;
DATABASE | SCHEMA | TABLENAME | ALLOCATED_BYTES | USED_BYTES
----------+--------+-----------+-----------------+------------
MYDB | SCH1 | TEMP1 | 3145728 | 131072
(1 row)
If the system does not have any temp tables
at the time that the command runs, the command does not show any rows:
MYDB.SCH1(USER)=> SHOW TEMP TABLE;
DATABASE | SCHEMA | TABLENAME | ALLOCATED_BYTES | USED_BYTES
----------+--------+-----------+-----------------+------------
(0 rows)