Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: datatypes

Re: datatypes

From: <Rick_Cale_at_teamhealth.com>
Date: Thu, 02 May 2002 07:13:27 -0800
Message-ID: <F001.00456341.20020502071327@fatcity.com>

Hi,

One way is to do the following:

  1. Export the table for backup purposes
  2. Create a temp table containing the primary key and column to be altered.
  3. update original_table set number_column=null;
  4. alter original_table <table_name> MODIFY (column(3,2));
  5. Update column from temp table. (Assuming all the data in temp table will go in number(3,2) format.

Rick

                                                                                                                   
                    Imran Ashraf                                                                                   
                    <imran9a_at_yaho        To:     Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com>       
                    o.com>               cc:                                                                       
                    Sent by:             Subject:     datatypes                                                    
                    root_at_fatcity.                                                                                  
                    com                                                                                            
                                                                                                                   
                                                                                                                   
                    05/02/2002                                                                                     
                    09:18 AM                                                                                       
                    Please                                                                                         
                    respond to                                                                                     
                    ORACLE-L                                                                                       
                                                                                                                   
                                                                                                                   




Hi,

i have a column set to number(3). However this needs to be changed to number (3,2). But i cannot do a straight alter table as there is data in the column.

how can i get round this?

cheers



Do You Yahoo!?
Yahoo! Health - your guide to health and wellness http://health.yahoo.com
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Imran Ashraf
  INET: imran9a_at_yahoo.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L

(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing). -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: INET: Rick_Cale_at_teamhealth.com Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).
Received on Thu May 02 2002 - 10:13:27 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US