Quantcast
Channel: SCN : Discussion List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 6412

Create column if not exists

$
0
0

I have totranslate this oracle script into hana script


declare

x number;

 

begin

    select count(*) INTO x from user_tab_cols where table_name = 'EM_WEB_SERVICE_PARAMETRI' and column_name = 'TIPO_FILTRO_DATI';

    if x=0 then

       begin

          execute immediate ('ALTER TABLE EM_WEB_SERVICE_PARAMETRI ADD TIPO_FILTRO_DATI VARCHAR2(30) NULL');

       end;

    end if;

end;

/

 

 

i have see  IF EXISTS | SAP HANAbat this SP not give error and not delete table

 

How can Itranslatethis script?

Can I do a script similar to oracle and I do not a SP?

 

You can help me?

 

Another question: how can I getautomaticallythe schema name?

thanks Paola


Viewing all articles
Browse latest Browse all 6412

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>