cancel
Showing results for 
Search instead for 
Did you mean: 

Adding new columns into existing HANA table

0 Kudos

Hi,

     I need to add new column into an existing table in hana system. I  used normal SQL alter command for altering new column but it's not working.

ALTER TABLE table_name

ALTER COLUMN column_name datatype;

Can anyone please suggest correct syntax for this.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member

CREATE COLUMN TABLE MYTAB (SOME_FIELD INTEGER);

ALTER TABLE MYTAB ADD (ANOTHER_FIELD CHAR(1));

0 Kudos

This message was moderated.

Answers (1)

Answers (1)

Former Member

ALTER TABLE <tablename> ADD (<columnname> <datatype>);

Example:

ALTER TABLE "PROCUREMENT"."TEST_DATA" ADD (STATE VARCHAR(10));

0 Kudos

Hi Abhishek,

I tried with your syntax its working fine.

Thank you.