Skip to Content
-3

How to check if table already exists in SAP HANA

Mar 09 at 08:20 AM

81

avatar image
Former Member

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?

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Danilo Kasparian Mar 09 at 02:24 PM
0

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';
Share
10 |10000 characters needed characters left characters exceeded