Temporary tables in hana

ronron555 picture ronron555 · Nov 9, 2017 · Viewed 10.5k times · Source

it it possible to write script in hana that crate temporary table that is based

on existing table (with no need to define columns and columns types hard coded ):

 create local temporary table #mytemp (id integer, name varchar(20));

create temporary table with the same columns definitions and contain the same data ? if so ..i ill be glad to get some examples

i am searching the internet for 2 days and i couldn't find anything useful

thanks

Answer

Lars Br. picture Lars Br. · Nov 10, 2017

Creating local temporary tables based on dynamic structure definition is not supported in SQLScript.

The question would be: for what do you want to use it? Instead of a local temp. table you can use a table variable in most cases.