Changing a varchar2 column (11) to varchar2 (15)

Hello

I have a table of 600GO containing nearly 200 columns. This picture is obviously not truncated, it is a table partitioned and sous-partitionnée. I have a varchar2 column I need to increase the length. This table is in a production database and so I don't have TO run any risk with him even if I have to find a way to increase the size of the relevant column. Let's say that the table name is XLARGE_TABLE and the column I need to edit is called FIRST_COLUMN. I would like to know the safety and execution of the execution of the following simple ALTER statement:

ALTER TABLE XLARGE_TABLE CHANGE FIRST_COLUMN varchar2 (15).

NOTE: FIRST_COLUMN is filled throughout with millions of rows table.

Thank you very much for your attention to help me in this regard.
T. San.

Hello

Alter A VARCHAR2 (10) to VARCHAR2 (10) WILL take very very little time (micro seconds), it will stop any transaction instruction dml on tables.
---------------------------------------------------------------------------------------------------------
SQL > desc emp;
Name Null? Type
----------------------------------------- -------- ----------------------------

NAME VARCHAR2 (10)

SQL > alter table emp change (name varchar2 (15));

Modified table.

SQL > desc emp;
Name Null? Type
----------------------------------------- -------- ----------------------------

NAME VARCHAR2 (15)

Published by: Rajesh.Rathod on January 25, 2009 13:27

Tags: Database

Similar Questions

  • Change in the columns InDesign police

    I have a body of text in InDesign, which is formed in columns by using the tab (as below)

    EXAMPLE example example

    Info Info Info

    Is it possible that I can format the columns differently?  For example, can I change the second column of bold text and the third the italics?

    Yes, use the Styles nested in your paragraph style.

  • Change the first column seen in the datagrid by code?

    Hello

    Is anyway to change the first column in a DataGrid using action script? I mean, for example, think I have 10 columns, only 3 are seen (0,1,2). I just want to have a button to change the first column view. Thus, for example, if I press it, 1.2, and third column will be those that is displayed in the datagrid control. I need to emulate the same thing that the scroll bar when you drag in a datagrid, but instead of letting the scroll bar does that automatically, I want to "scroll" datagrid manually.

    Moreover, is anyway through datagrid children and hide the scrollbar manually?

    Thanks in advance,

    Aron.

    horizontalScrollPolicy

  • Change data type column - performance of indexes in Oracle 10 g

    Hello
    I have a table with too many lines (lines more than 2000000). I changed the data type (NUMBER of VARCHAR2) of an indexed column (the index is only for this column), using a temporary backup table:

    CREATE TABLE BKTABLE AS SELECT FIELD, ROWID AS IDROW ORIGNALTABLE;
    UPDATE ORIGNALTABLE SET FIELD = NULL;
    ALTER ORIGNALTABLE CHANGE THE FIELD VARCHAR2 (256);
    ORIGNALTABLE UPDATE A FIELD SET = (SELECT FIELD OF BKTABLE B WHERE B.IDROW = A.IDROW);

    This way worked OK.

    There is no performance problem knew about the ORIGNALTABLE index? Need to rebuild this index?

    Thks!

    Need to rebuild this index?

    YES

    ALWAYS
    View the name of the operating system (OS) & version for DB Server System.
    View the results of
    SELECT * from version $ v
    or post the Oracle version with 4 decimals

  • Materialized view rebuild to change size of column

    We have changed the size of a varchar2 column in an OLTP table... The matte view in the warehouse pointing to this table/column complains... Is there an argument to 'rebuild' for materialized views in Oracle as I've seen in other databases? Or should I remove mast view create view Matt, create indexes and collect the tablestats to get it to pick up the new size of the column.

    The following statement compiles the matte view but does not pick up the new size and the matte view guard Plains.
    alter materialized view sms_ar.mv_sufficiency compile;
    I tried to put the argument of the 'reconstruction' on it but could not operate.

    Hi Mark,

    What is

    SQL> create table t(x varchar2(5))
    Table created.
    
    SQL> create materialized view mv
    as
      select x from t
    Materialized View created.
    
    SQL> alter table t modify x varchar2(10)
    Table altered.
    
    SQL> desc t
    TABLE t
     Name                                      Null?    Type
     ----------------------------------------- -------- -----------
     X                                                  VARCHAR2(10)
    
    SQL> desc mv
    TABLE mv
     Name                                      Null?    Type
     ----------------------------------------- -------- -----------
     X                                                  VARCHAR2(5)
    
    SQL> alter materialized view mv modify x varchar2(10)
    Materialized View altered.
    
    SQL> desc mv
    TABLE mv
     Name                                      Null?    Type
     ----------------------------------------- -------- -----------
     X                                                  VARCHAR2(10)
    

    Concerning
    Peter

  • Editable interactive report. To change the list column dropdown type filter.

    Hi all, I thought I had posted this, but I can't find my post, so apologies if it turns up to twice more...

    XE SUMMIT 4.2 11.2

    Ive created an editable interactive report... Everything works very well, and I have several Text, LOV and selection list columns...

    However when I now click on a column header to filter, sort etc drop-down list is the same format as the column itself. So if for example, I have a text box, then the drop-down list is also text boxes, if the column is a column LOV, the filter drop-down list is a list of fields LOV. (Im assuming this is correct behavior, because it simply inherits the column parent..)   So, I would change the lists to a list of standard display so that they are in order and can be used...

    I think so? I know I have to do, which is either to substitute the function that generates the dropdown filter... or probably more simply, write a bit of JS/JQuery that modify data for drop-down lists.  Im still to learn, some help would be appreciated...

    I think so. (and please correct me if I'm talkiing... garbage)   I need to find each of the appearance of the DIV with the ID that corresponds to the drop-down list box, and then loop through each entry and change the structure...

    Currently the source for drop-down fields resembles the following (for a text field...). :

    < div id = "apexir_rollover_content" >

    < a href = "javascript:void (false); ">

    < input type = "text" value = "24489" maxlength = size "2000" = "6" name = 'f06' > < / input >

    < /a >

    < a href = "javascript:void (false); ">

    < input type = "text" value = "N1021" maxlength = "2000" size = "6" name = 'f06' > < / input >

    < /a >

    < / div >

    How could I 1) browse each occurrence of div id = "apexir_rollover_content" on my page, so I found out about each other, how would I go through the list and change the line above an input to a standard list item text...? Or is there a simpler way to do it?

    Kind regards

    Richard

    Hello

    Problem was on your process to GET the VALUES of LOV.

    You did not bind the variable values of cursor.

    I created another process for your page that manages LOV BUDGET_CAT

    Kind regards

    Jari

  • Changing Format of column ODI

    Hi all

    I created a mapping (interface) on ODI 12 c. In the area of the source, there is a view (view very huge and important), created in Oracle db. In the target box, my table is in MSSQL Server. Here, the problem is, a column in the view Oracle type does not match the target MSSQL table. Therefore, I must add TRUNC funtion to this column, but I can't change in the actual db. I just have to environment ODI. Is it possible to edit the data coming from the database in ODI? If not, what can I do? Changing the type of column in MSSQL does not work. It does not support a data type for holding such a number;      "70.32782857142857142857142857142857142857'".

    Can you help me?

    Thank you

    Hello

    Yes, you are right, the problem occurred before the truncation or rounding, because we are trying to truncate data to MSSQL that is target and he accepts not the many to MSSQL and the production of the error.

    As an alternative, we can truncate the data only at the level of the source that is Oracle and just pass the data truncated to MSSQL.

    You can use component (tool) "EXPRESSION" of ODI for your purpose, put only to this view oracle column (as well as the types are mismatching) in EXPRESSION and use trunc on or in the EXPRESSION properties, choose 'source' in the ' run on Hint "option.

    But I'm not sure that with this truncation method will be at the level of the source only. Please try it, Hope so it can walk.

    Thank & best regards

    Shiv Kumar

  • Dynamically change the Lable column

    Hello
    I'm looking for some help in the report of the apex. I have a requirement where I want to show the name of the month as the column title. That change dynamically. below I have elabrated my requirement.

    Report of Novemeber
    Customer name Nov Oct Aug Jul Jun Sep
    99 99 99 99 99 99 XXXXXXXXXXXXX
    99 99 99 99 99 99 XXXXXXXXXXXXX


    December report
    Customer name Dec Nov Oct Aug Jul Sep
    99 99 99 99 99 99 XXXXXXXXXXXXX
    99 99 99 99 99 99 XXXXXXXXXXXXX


    I can dynamicallly change column lable shown above?

    Thanks in advance

    Set the field Type in the report attributes to PL/SQL and create a body of the function that generates and returns a string delimited by a colon that contains the required headers.

    See + {message identifier: = 10642248} + for an example.

  • Merge changes from two columns in a column

    Hello, I need to merge the address1 and address2 fields in the db of target at a single address field in the destination table. One-way replication.

    So if the table target address1 = "123 Main Street" and address2 = "apt 101" I want the address of destination to be '123 Main Street apt 101 '. And if adddress2 was changed to 202 then the destination would contain "123 Main Street apt 202.

    Is this possible? Thank you!

    Published by: 930552 on April 26, 2012 14:52

    In your Replicat, you can combine columns.

    Name of the target column equal to the concatenation of the columns (and spaces/punctuation) from the source.

    Map of HR. EMPLOYEES, target HR. EMP,
    COLMAP (USEDEFAULTS,
    ANNUAL_SAL = @COMPUTE(SALARY * 12)
    FULL_ADDRESS = @STRCAT (ADDRESS1, ",", ADDRESS2));

  • changes in the column...

    Hi guys,.

    just trying to understand what is the concern of my apps to the dba teams.

    One of the colume in this table is currently in:

    number (6.3) and they asked is there no impact if it were to change-> the precision of the column 'XX' to 6 decimal places. What does that mean and what is the new value then?

    Read the documentation, but do not really understand.

    There will be any impact as invalid objects. Or objects failed to change the structure of the table. New column or total change to add the data type of an existing column.

    >
    Why it will be a problem since I will increase to 6 fear? So if it goes across 3 my new scale value still can accommodate it.
    >
    I said it COULD be a problem. It would not be a problem depending on the data that you use.
    If you have inserted data EVER with more than 3 decimal places before, then there is a problem.

    But if you don't you may have lost some of the data

    This simple example and see what I mean:

    CREATE TABLE SCALE_TEST2 (ID NUMBER, NUM6_3 NUMBER(6,3), NUM9_6 NUMBER(9,6))
    
    INSERT INTO SCALE_TEST2 VALUES(1, .00049, .00049) -- do this line 10 times to insert 10 records
    
    INSERT INTO SCALE_TEST2 VALUES(2, .00051, .00051) -- do this line 10 times to insert 10 more records
    
    SELECT ID, SUM(NUM6_3) TOT6_3, SUM(NUM9_6) TOT9_6
    FROM SCALE_TEST2 GROUP BY ID
    
    ID = 1    TOT6_3 = 0      TOT9_6 = 0.0049  -- old value is less than new
    ID = 2    TOT6_3 = 0.01 TOT9_6 = 0.0051  == old value is greater than new
    

    For ID = 1 values will< .0005="" will="" always="" become="" 0="" (truncated)="" for="" a="">
    ID = 2 values > =.0005 and< .001="" will="" always="" become="" 1="" (rounded="">

    Records you add more the difference.

    That IS THE PROBLEM - if you reload old data that had more than 3 decimal places in the new table, and then you actually change the data in the table and it will act as the data in the above example. None reported that the data rollup and group them differently may show slightly different than the old report because of the truncation and rounding results that occurred.

    >
    Don't tell me we have to understand how to write code to "get" these value expect you and that is causing the problem.
    >
    Looks like you don't need me to tell you that since you already know.

    SELECT * FROM SCALE_TEST2  WHERE ABS(NUM9_6) > 999.999999
    

    All selected lines have values of NUM9_6 who might not fit into a column NUMBER (6.3). ABS (absolute valuel) is necessary because the data could be negative.

    Always TEST, TEST, TEST and use the data which includes the MAX and MIN values that may occur.

  • Impossible to change the table column heading alignment in 11.1.1.5

    11.1.1.5 work.

    I want to align to right one of my headers of columns in the Table view. I'm going in the criteria, the column properties tab. Format of the column and clicking the Format icon next to the column heading box. I'm on the column properties dialog box, change the background color, adding a border and right Horizontal alignment setting. See the table in the results, I see the background color of the column heading, and I see the border. However, the column header text is always aligned to the left.

    What Miss me it please?

    Hi Mark,

    You do not have lack of what, whether Oracle has missed this basic functionality! This is a bug :-(

    Bug 12696084: FORMAT HEADINGS > HORIZONTAL ALIGNMENT does NOT WORK IN THE TABLE OR the PIVOT VIEW

    Rgds,
    DpKa

  • How to change CSS dynamically columns class in a page

    Hello

    I have a page and I have columns like customer, charge at the location, date, date to the... etc.

    Once I have save records of the shoulbd of columns change to "BOLD" (OraDataText = CSS class). In a simple way of CSS class chain for a dynamic element to a specific value.

    Can someone help me if stumbled upon this kind of requirement.

    Please send me sample code if someone has it...

    Thank you
    Mahesh

    A simple idea, I can think of is to have two fields using the attribute of the view. Associate a SPEL attributes each of them (rendering property). When you initialize it to ensure that the normal field shows and when registration is click on the button appears to the method call in the AM to set the PVO attribute in a way that "BOLD" field. This can save a lot of effort.

    Concerning
    Sumit

  • Change in the column date year

    Ok

    I have the column type Event_Time DATE. He is the owner of this type of values: ' 21.04. * 0010 * 10:59:30 '

    Now, I don't want to change anything, except the YEAR. I want to replace "0010" with "2010".

    What is the best way to do it?

    THX

    Maybe something like that? (Note: this is not tested):

    UPDATE  
    SET     event_time = TO_DATE('2010' || TO_CHAR(event_time,'MMDDHH24MISS'),'YYYYMMDDHH24MISS')
    WHERE   TO_CHAR(event_time,'YYYY') = '0010'
    ;
  • change the selected column puts loop nested in the hash join

    Hi all

    If "select * from...". «I "select table.* of...» "then plan changes.
    PLAN_TABLE_OUTPUT
    ----------------------------------------------------------------------------------------------------------------------------------------
    SQL_ID  a4fgvz5w6b0z8, child number 0
    -------------------------------------
    select * from ofertas ofe, ofertas_renting ofer where ofer.codigodeempresa = ofe.codigodeempresa    AND ofer.numerooferta =
    ofe.numerooferta    AND ofe.captacion = '1'
    
    Plan hash value: 3056192218
    
    ----------------------------------------------------------------------------------------------------------------------------------------
    | Id  | Operation          | Name            | Starts | E-Rows | Cost (%CPU)| A-Rows |   A-Time   | Buffers |  OMem |  1Mem | Used-Mem |
    ----------------------------------------------------------------------------------------------------------------------------------------
    |*  1 |  HASH JOIN         |                 |      1 |  23766 |  4032   (2)|  27421 |00:00:00.96 |    5444 |  9608K|  1887K|   10M (0)|
    |*  2 |   TABLE ACCESS FULL| OFERTAS         |      1 |  23969 |  1324   (2)|  27421 |00:00:00.14 |    2140 |       |       |          |
    |   3 |   TABLE ACCESS FULL| OFERTAS_RENTING |      1 |  71297 |   937   (2)|  72385 |00:00:00.22 |    3304 |       |       |          |
    ----------------------------------------------------------------------------------------------------------------------------------------
    
    Predicate Information (identified by operation id):
    ---------------------------------------------------
    
       1 - access("OFER"."CODIGODEEMPRESA"="OFE"."CODIGODEEMPRESA" AND "OFER"."NUMEROOFERTA"="OFE"."NUMEROOFERTA" AND
                  SYS_OP_DESCEND("OFER"."NUMEROOFERTA")=SYS_OP_DESCEND("OFE"."NUMEROOFERTA"))
       2 - filter("OFE"."CAPTACION"='1')
    
    
    22 filas seleccionadas.
    
    PLAN_TABLE_OUTPUT
    ----------------------------------------------------------------------------------------------------------------------------------------
    SQL_ID  2410uqu059fgw, child number 0
    -------------------------------------
    select ofe.* from ofertas ofe, ofertas_renting ofer where ofer.codigodeempresa = ofe.codigodeempresa
    AND ofer.numerooferta = ofe.numerooferta    AND ofe.captacion = '1'
    
    Plan hash value: 4206210976
    
    ----------------------------------------------------------------------------------------------------------------
    | Id  | Operation          | Name               | Starts | E-Rows | Cost (%CPU)| A-Rows |   A-Time   | Buffers |
    ----------------------------------------------------------------------------------------------------------------
    |   1 |  NESTED LOOPS      |                    |      1 |  23766 |  1333   (3)|  27421 |00:00:00.58 |   33160 |
    |*  2 |   TABLE ACCESS FULL| OFERTAS            |      1 |  23969 |  1324   (2)|  27421 |00:00:00.27 |    3910 |
    |*  3 |   INDEX UNIQUE SCAN| PK_OFERTAS_RENTING |  27421 |      1 |     0   (0)|  27421 |00:00:00.26 |   29250 |
    ----------------------------------------------------------------------------------------------------------------
    
    Predicate Information (identified by operation id):
    ---------------------------------------------------
    
       2 - filter("OFE"."CAPTACION"='1')
       3 - access("OFER"."CODIGODEEMPRESA"="OFE"."CODIGODEEMPRESA" AND
                  "OFER"."NUMEROOFERTA"="OFE"."NUMEROOFERTA")
    
    
    22 filas seleccionadas.
    Why change if the cost to access the complete table OFFERS is identical in the two plans?

    Thank you very much.

    Joaquin Gonzalez

    Published by: Joaquín González on November 4, 2008 17:32

    Joaquín González wrote:
    Hello

    Perhaps the reason for Blevel = 0 is?

    "This is."
    some common cases that could result in a variation between the basic formula and the
    "result:

    ...

    "Index where the blevel is set to 1 (the index goes directly from the root block in the).
    leaf blocks). The optimizer ignores effectively the blevel if each column in the index
    appears in a predicate of equality. "

    Joaquin,

    you're referring to the chapter "access Simple B-tree", it is a nested loop operation, so this does not apply. You can see that the 'Simple B-tree access' refers to a cost of 1, you have tested yourself.

    I think that it is a special case, if you have a nested loop operation that uses access unique index as the source of the inner line, then the cost of access unique index is simply BLEVEL - 1. You might get a different cost if access additional table of rowid is involved, which is usually the case. But even in this case access to the unique index is always encrypted in BLEVEL - 1, and access the table by rowid is usually encrypted to 1 by iteration.

    You can see on page 313 (chapter "Nested Loop") that Jonathan has used an example involving a unique index scan that also has a cost of 0.

    Kind regards
    Randolf

    Oracle related blog stuff:
    http://Oracle-Randolf.blogspot.com/

    SQLTools ++ for Oracle (Open source Oracle GUI for Windows):
    http://www.sqltools-plusplus.org:7676 /.
    http://sourceforge.NET/projects/SQLT-pp/

  • Change the number columns individually

    I've never used any kind of spreadsheet before, but now I need to build a five-column table, and 300 lines and numbers appears as one of the easiest programs I've seen. The only feature that I have not found is a way to vary the width of individual columns. Is there a way?

    It can be done, and I just learned how. Numbers of resembles the spreadsheet for me.

  • Maybe you are looking for