Deleting from temporary table in SAP HANA

SAP HANASAPSAP Basis

The temporary tables are session specific. So you would require to use truncate instead of delete as follows

truncate table #temptable;

Also, could you please check your release? In the recent releases, delete also works fine. Here is an example:

Drop table #temptable;
Create local temporary table #temptable(id integer, str nvarchar(30));
Insert into #temptable values (1,'abc');
Insert into #temptable values (2,'xyz');
Select * from #temptable;  --> returns 3 rows
Delete from #temptable;
Select * from #temptable;--> returns 0 rows
raja
Published on 14-Dec-2017 10:09:01
Advertisements