cancel
Showing results for 
Search instead for 
Did you mean: 

Find a specific Temporary Table in Hana

Former Member
0 Kudos

Hi Experts, I'm trying to validate if an specific temporary table is already created to avoid duplicates. How can I do that?

Could be something like

IF temp_table exists

     truncate or drop table

     create table again

else

//some code

Thanks in advance!

Message was edited by: Tom Flanagan

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Just drop the table and catch the exception. If you're going to drop it anyhow, just put a drop and create in place. Then if it doesn't exist it creates an exception, which you can catch and ignore.

Answers (1)

Answers (1)

lbreddemann
Active Contributor
0 Kudos

Why don't you simply use local temporary tables and recreate them anyway?