Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2004
    Posts
    370

    Unanswered: How can I modify the datatype?

    Hi all,
    I am trying to modify a column named PID from NUMBER(8) to NUMBER(10).
    but this column is PK and also many foreign keys in other tables are referencing this and this is own is referencing another table.
    So How can I do this without deleting all data and constraints?
    --thanks in advance

  2. #2
    Join Date
    Jun 2003
    Location
    West Palm Beach, FL
    Posts
    2,713

    Wink

    There is no impact by executing this statement:
    Code:
    ALTER TABLE MyTable MODIFY(PID NUMBER(10));
    The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb

  3. #3
    Join Date
    Oct 2004
    Posts
    145
    additional info.

    If you are increasing the column width, oracle let's you change it dynamically. You need to be concerned with data migration when reducing the size.

Posting Permissions

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