Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Temporary table error in hana

Hi,

I have created a temporary table in hana SQL console using the following syntax.

create global temporary column table "MONISSHAA"."DUMMY"(ID nvarchar(1));

insert into "MONISSHAA"."DUMMY" values('1');

The select * statement below returns one record

select * from "MONISSHAA"."DUMMY"

But the data preview on the temporary table directly  shows zero records returned.

How is this temporary table concept working??

Kindly clarify this.

Thanks & Regards,

Monissha

Tags:
Former Member
Former Member replied

Hi Monissha,

     Temporary tables can be created at runtime and can do the all kinds of operations that one normal table can do. But, based on the table types, the scope is limited.

    • Temporary Tables lets you store and process intermediate results.
    • Temporary tables only last as long as the session is alive.
    • Data in temporary tables is automatically deleted at the end of the database session, even if it ends abnormally.

That's why the table which you created, can be used to fetch data using the select query but you will not find any data while using the data preview.

Cheers,

Sumit

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question