cancel
Showing results for 
Search instead for 
Did you mean: 

How to check if table already exists in SAP HANA

0 Kudos

Hi,

I have to create a table if it doesn't exist.

I have gone through this answer https://archive.sap.com/discussions/thread/3383646 but here we use procedures and in it we are having a count of number of rows if greater than zero then the required execution is being made. But in my case the table is empty, even if it is created, so how could I check for it to be present in the DB? Is there any alternative way of creating a table (if it doesn't exists) other than the procedure check?

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member233854
Active Contributor
0 Kudos

Hi,

This table must show your table even if there is no records, bear in mind that HANA is case sensitive.

As another alternative you could check your table using the query below

select * from sys.objects where schema_name = 'SBODEMOUS' and object_name='YOURTABLE';