Skip to Content
author's profile photo Former Member
Former Member

Table column Datatype modification

Dear Contributors,


Can we change the size of the datatype using Alter table command, of sap hana custom table ? I mean can't we increase the size of character datatype ?


Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Aug 23, 2016 at 07:09 AM

    Increasing the size of character type columns is possible using the ALTER TABLE statement. Check the online help ALTER TABLE - SAP HANA SQL and System Views Reference (also with the mentioned limitations).

    For instance, if a table with a nvarchar(100) typed column is created ...

    CREATE COLUMN TABLE "MISC"."TEST"(
      id integer primary key,
      value nvarchar(100)
    );
    

    ... the size can be increased to nvarchar(200) using statement

    ALTER TABLE "MISC"."TEST" ALTER (value nvarchar(200));
    

    Regards,

    Florian

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.