So I'm still farily new to Teradata, but can someone help explain to me why when I create a temp table, I can't query from it in another (new) SQL editor?
For example, say I create the temp table below:
CREATE VOLATILE TABLE tmp_Table AS ( Select * FROM ... ) WITH DATA ON COMMIT PRESERVE ROWS;
When I try to do a simple "SELECT * FROM tmp_Table", in another query editor, it returns the error: Object 'tmp_Table' does not exist.
Any ideas as to why?
Solved! Go to Solution.
For GLOBAL TEMPORARY tables, the definition exists within the data dictionary. Multiple sessions can reference that definition, but each will have its own private instance of the temporary table; the contents of an instance will only be available within that one session.
For VOLATILE tables, even the definition exists only within the session that creates the table.
To access the same content from multiple sessions, use a regular, "permanent" table.