Syntax error Deleting from temporary table in SAP HANA

Deleting from temporary table in SAP HANA



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
Updated on: 2019-12-05T09:42:28+05:30

980 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements