Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2002
    Posts
    1

    Unanswered: Datatype conversion in Oracle 7.3.4

    Hello,

    What is the procedure to convert the datatype of field in a table. The table already has 1.3 million records are there. I need to change the datatype of one particular field from Number to Alphanumeric.

    Please help me

    Thanks
    Selva

  2. #2
    Join Date
    Jan 2002
    Location
    italy
    Posts
    39
    Hi:

    The syntax to modify the datatype of a column is

    alter table table_name modify (column datatype);

    in your case something like

    alter table test_table modify (test_column varchar2(10))

    However, in the column is not empty you may receive this error

    ORA-01439: column to be modified must be empty to change datatype


    This means that you must clear the values in the column, modify the datatype than recover the value.

    You may do this, depending on your needs, using a backup table, or with an import/export... or any other way to backup the data.

    regards,
    astropp

Posting Permissions

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