Results 1 to 3 of 3
  1. #1
    Join Date
    May 2011
    Posts
    2

    Unanswered: Increase column width of an existing table.

    The below table has following structure

    SQL> desc custom.sample
    Name Type

    NAME VARCHAR2(15)
    EMPNUM NUMBER(3)

    Want to increase the datatype of EMPNUM from NUMBER(3) to NUMBER(10)
    I also have tried

    SQL> alter table custom.sample alter column EMPNUM NUMBER(10);
    alter table custom.sample alter column EMPNUM NUMBER(10)
    *
    ERROR at line 1:
    ORA-01735: invalid ALTER TABLE option

    is there any simple solution for this rather than dropping and creating that table again????

  2. #2
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    Certainly, there is. ALTER TABLE command is to be used, but not with your own syntax. You MUST follow syntax defined by Oracle. As you didn't specify your database version, here is 10g R2 ALTER TABLE documentation. "Modify column" is what you are looking for.

  3. #3
    Join Date
    May 2011
    Posts
    2
    Thnks Littlefoot

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •