Skip to Content
avatar image
-3
Former Member

How to check if table already exists in SAP HANA

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?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Mar 09 at 02:24 PM

    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';
    Add comment
    10|10000 characters needed characters exceeded