Results 1 to 3 of 3

Thread: script

  1. #1
    Junior Member
    Join Date
    Jun 2008
    Answers
    10

    script

    hi guys,

    i wanna change the type of a column i have in my table;
    for example from int(4) to varchar(20).
    any script to do that??

    thanks in advance


  2. #2
    Moderator
    Join Date
    Jun 2007
    Answers
    2,074

    Re: script

    You need to alter the table for that.


  3. #3
    Expert Member
    Join Date
    Sep 2007
    Answers
    697

    Re: script

    Use alter table.

    SQL> CREATE TABLE TEST_DATA ( X NUMBER);

    Table created.

    SQL> ALTER TABLE TEST_DATA MODIFY (X VARCHAR2(10));

    Table altered.

    You may not decrease the size of a columns or change its data type , unless it contains no data (especially for numeric data)


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact