Skip to Content
-2

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

Sep 29, 2017 at 08:00 AM

96

avatar image
Former Member

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).

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

1 Answer

Lars Breddemann
Sep 30, 2017 at 03:16 AM
0

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.

Show 1 Share
10 |10000 characters needed characters left 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.

0