Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2004
    Posts
    67

    Unanswered: Increasing the Size of the column

    I need to increase the Size of a column in the database from varchar2(34) to varchar2(250).

    I dont want to delete the data in the table and re-create the table.
    Lots of people are using this table.

    I am using Oracle 9i.

    what should i do ?

    thanks
    Shankar

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    >I need to increase the Size of a column in the database from varchar2(34) to varchar2(250).


    alter table t1 modify (ename varchar2(250));
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  3. #3
    Join Date
    Apr 2004
    Posts
    27

    Re: Increasing the Size of the column

    Originally posted by shankar
    I need to increase the Size of a column in the database from varchar2(34) to varchar2(250).

    I dont want to delete the data in the table and re-create the table.
    Lots of people are using this table.

    I am using Oracle 9i.

    what should i do ?

    thanks
    Shankar
    Try creating an another table(eg:b) with the size increased and with the data from the original table(eg:a). delete the original table(a) and rename this table name(b) with its original table name(a).

  4. #4
    Join Date
    Apr 2002
    Location
    California, USA
    Posts
    482
    Quote Originally Posted by shankar
    I need to increase the Size of a column in the database from varchar2(34) to varchar2(250).

    I dont want to delete the data in the table and re-create the table.
    Lots of people are using this table.

    I am using Oracle 9i.

    what should i do ?

    thanks
    Shankar

    That's a data dictionary change. Users & data won't get affected. Use the ALTER TABLE .... MODIFY command and you will have it done for 1 second.


    HTH,

    clio_usa - OCP 8/8i/9i DBA

  5. #5
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    Nothing much to add ... however, I'd like to say that resizing a column can be done without problems if we are increasing its size. Decreasing can't be done as simple as that - the column must be empty before decreasing operation so its data have to be saved somewhere else and then (after decreasing) returned back.
    Last edited by Littlefoot; 04-26-04 at 04:10.

Posting Permissions

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