Skip to Content
avatar image
-2
Former Member

How to add an EXTRA/ADDITIONAL filed to an EXISTING table in HANA ?

For Example:

I have a table employee with below fields;

EMP_ID EMP_FNAME EMP_ADDRESS EMP_CITY

----------- ------------------- ----------------------- ---------------

1 ABC USA NEW YORK

2 XYZ UK LONDON

3 MNO INDIA DELHI

Now, I want to add an ADDITIONAL columns field "EMP_LNAME" between EMP_FNAME and EMP_ADDRESS. How to do that ?

I know that, through an ALTER statement(alter table tablename ADD()) we can add, but, it will add at the last(after EMP_CITY).

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Sep 30, 2017 at 03:16 AM

    A little research from your side would have provided you with the answer, as this specific question seems to come up again and again over time.

    There's only one DBMS I know of that actually directly supports this operation (again, search engine usage is your friend here), but due to how relational/SQL databases work, the order of columns in tables really does not matter.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Thanks for the reply Lars :)

      It was a question from one of my business counter part :P

      as you said, "the order of columns in tables really does not matter", your certainly right. But, he wanted to add in the middle only. Hence, I was looking any such solution exist. :)

      At times, I felt, may be "order of the column/s is matter too.