刪除 SAP HANA 中的臨時表


臨時表是會話特定的。因此,你需要使用下列 truncate 而不是 delete

truncate table #temptable;

另外,你能否檢查你的版本?在較新的版本中,delete 也能正常工作。這裡有一個示例

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

更新時間:05-12-2019

750 次檢視

啟動您的 職業生涯

完成課程,獲得認證

開始
廣告