Change a column name

What is the correct syntax to change a column name. say
ID VARCHAR2(10)
to
ID_NO VARCHAR2(10)

You can alternatively do this:
Connect as sys user and run the following script:
SELECT obj# from obj$
where name = 'Your_Table_Name';
SELECT col# from col$
where obj# = obj# from previous query
and name = 'your_column_name which you want to rename';
update col$ set name = 'your_new_name'
where obj# = obj# from the first query
and col# = col# from previous query;
Alter system flush shared_pool;
connect as your user and you will see the change there.
Hope this helps
Rajeev

Similar Messages

  • How to change the column names in display

    Hi,
    I want to change the columns names and give the display names as more User friendly..
    How should I acheive this in WebI reports.
    Regards,
    BOB

    Hi,
    the columns names are normal text fields. Just selecdt to edit your report , go to the editor panel and select the column header you want to modify. You can enter the text you want to display
    Regards,
    Stratos

  • How to change the column name as bold in adf table

    Hi,
    How can I change the column name with bolder style and blue colour in adf Table?
    I changed the color and font weight in af:column properties, but its effecting the data in that column but not with the column Header Text property.(i have given column name in header text).
    can any one have any idea how to do this?
    and I have taken panel tabbed layout and in that i'm displaying this table.
    but this table has scroll beneath of it to show all columns.
    but i want to display all columns (for this, page should have scroll at the bottom side).
    how can I achieve this???

    Hi,
    Add the following CSS Code to the custom skin css file that is to be created as per the suggestions above.
    *af|column::column-header-cell{*
    color:Blue;
    font-weight:bold;
    This would ensure that all the table column headers are blue in color and bolder font style through-out the application.
    By the way, what version of JDeveloper are you using?
    Thanks,
    Navaneeth

  • BSP Changing the Column name

    Hi experts,
    I have used tableview in BSP . In the output it displays the column name as per the table which i have referred. I want to change the name of the column. How Should i do that.. anyone plz explain me with an example.
    Thanks in Advance
    Edited by: Vijay Babu Dudla on Apr 28, 2009 12:59 AM

    Hi ,
    If you want to change the column name, you can put your code following:
    <htmlb:tableViewColumn columnName    = " "
               *title        = " put the cloumn name here"*
               </htmlb:tableViewColumn>
    Please try.
    Any doubt let me know.
    Regards,
    Chris Gu
    Edited by: Gu Chris on Apr 28, 2009 5:26 AM
    Edited by: Gu Chris on Apr 28, 2009 5:26 AM
    Edited by: Gu Chris on Apr 28, 2009 5:27 AM

  • Change the column names programatically

    Hi All,
    is it possible to change the column name in a table programatically?? my req is like this..I ve a table which contains 60 columns. out of these 60 columns 53 columns signifies the 53 weeks of the year. so i ve to display the date in the column headers. How can i achieve this?
    Thanks in advance,
    Sree

    Column prompts can be modified through the OAF Personalization screens. This will ensure you are declaratively setting the values.
    Regards,
    Prabodh.

  • Changing JTable column names

    I have a JTable where the user can right click on the table header to change what data is displayed. When the user selects different data to display, I would like to change the column name to reflect this. What is the best way to do this?
    TIA
    ZeroFK

    table.getColumnModel().getColumn(???).setHeaderValue(???).

  • Changing the column names displayed via an ODBC driver

    Hi we are just starting to used Crystal Reports to improve the reporting capabaility of a legacy application, we can access the data fine using an ODBC driver. What we want to do is change the column names that are displayed within Crystal Reports so they are more user friendly and not in techno speak,, so that the users can create their own reports. Do we need to used Business Objects to setup a Universe to do this, is their a simple cheaper method sorry if this post is in the wrong section

    Can you set up "views" in your database? That would probably be the easiest way to do this.
    -Dell
    - A computer only does what you told it to, not what you thought you told it to!</p>

  • Changing Alv Column name

    Hi,
    I have a "viewcontaineruielement" which displays an ALV. Now i want to change the column names.
    Please give an detailed answer.
    Thanks

    Hi Adil
    Ple refer this.
      data:
    lr_alv_usage type ref to if_wd_component_usage,
    lr_if_controller type ref to iwci_salv_wd_table,
    lr_config type ref to cl_salv_wd_config_table,
    lr_column type ref to cl_salv_wd_column,
    lr_header type ref to cl_salv_wd_column_header,
    lr_column_settings type ref to if_salv_wd_column_settings,
    ls_column type salv_wd_s_column_ref,
    lt_columns type salv_wd_t_column_ref,
    Instantiate the ALV Component
    lr_alv_usage = wd_this->wd_cpuse_alv_display( ).
    if lr_alv_usage->has_active_component( ) is initial.
    lr_alv_usage->create_component( ).
    endif.
    Get reference to model
    lr_if_controller = wd_this->wd_cpifc_alv_display( ).
    lr_config = lr_if_controller->get_model( ).
    To get the dropdowns displayed you need to set the table to editable by using below statement
    lr_config->if_salv_wd_table_settings~set_read_only( abap_false ).
    Set the UI elements.
    lr_column_settings ?= lr_config.
    lt_column = lr_column_settings->get_columns( ).
    ********-- Header Settings--*************
      lr_column = lr_column_settings->get_column( 'VBELN' ).
       lr_column->set_position( '1' ).
      lr_header = lr_column->get_header( ).
      lr_column->set_width( '2' ).
    lr_column->Set_width( '2' ).
       lr_header->set_text( 'Invoice No' ).
      lr_header->set_tooltip( 'Invoice No' ).
        lr_header->set_ddic_binding_field( ).

  • Change in column name in REUSE_ALV_FIELDCATALOG_MERGE

    Hi Everyone,
    In my requirement  I need to change the column name in the internal table t_fieldcat. But where can i find the way to change the names of column in REUSE_ALV_FIELDCATALOG_MERGE
       CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
         EXPORTING
           i_structure_name       = 'YV_TAB'
         CHANGING
           ct_fieldcat            = t_fieldcat
         EXCEPTIONS
           inconsistent_interface = 1
           program_error          = 2
           OTHERS                 = 3.

    Hi,
    you can do it in different ways, please try
    1) Build field catelog
    CLEAR wa_fieldcat.
      wa_fieldcat-tabname     = tab_name
      wa_fieldcat-fieldname   = 'Field Name'
      wa_fieldcat-seltext_l   = 'Field Text'.
      wa_fieldcat-outputlen   = 15.
      APPEND wa_fieldcat TO it_fieldcat.
    2) Create a structure with required fileds and create new data element refer with standard domain. Then you can give your require text in the Field Label tab. pass this structure to the FM.
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
    EXPORTING
    i_program_name         = sy-repid
    i_internal_tabname     = 'internal_tab_name'
    i_structure_name       = 'structure_name'
    i_inclname             = sy-repid
    CHANGING
    ct_fieldcat            = it_fieldcat[]
    EXCEPTIONS
    inconsistent_interface = 1
    program_error          = 2
    OTHERS                 = 3.
    IF sy-subrc <> 0.
    * Implement suitable error handling here
    ENDIF.

  • Can I change the Column Name without losing data and change the sequence

    Dear Experts,
    I want to change the column name without changing the sequence and dont want lose the data.

    Oracle Version : ?
    Example Based on 10g.
    SQL> conn scott/tiger
    Connected.
    SQL> create table col1 as select * from all_objects where rownum <= 100;
    Table created.
    SQL> alter table col1  add constraints col1_pk_objid primary key(object_id);
    Table altered.
    SQL> desc col1
    Name                                      Null?    Type
    OWNER                                              VARCHAR2(30)
    OBJECT_NAME                                        VARCHAR2(30)
    SUBOBJECT_NAME                                     VARCHAR2(30)
    OBJECT_ID                                 NOT NULL NUMBER
    DATA_OBJECT_ID                                     NUMBER
    OBJECT_TYPE                                        VARCHAR2(19)
    CREATED                                            DATE
    LAST_DDL_TIME                                      DATE
    TIMESTAMP                                          VARCHAR2(19)
    STATUS                                             VARCHAR2(7)
    TEMPORARY                                          VARCHAR2(1)
    GENERATED                                          VARCHAR2(1)
    SECONDARY                                          VARCHAR2(1)
    SQL> alter table col1 rename column object_id to object_no;
    Table altered.
    SQL> desc col1;
    Name                                      Null?    Type
    OWNER                                              VARCHAR2(30)
    OBJECT_NAME                                        VARCHAR2(30)
    SUBOBJECT_NAME                                     VARCHAR2(30)
    OBJECT_NO                                 NOT NULL NUMBER
    DATA_OBJECT_ID                                     NUMBER
    OBJECT_TYPE                                        VARCHAR2(19)
    CREATED                                            DATE
    LAST_DDL_TIME                                      DATE
    TIMESTAMP                                          VARCHAR2(19)
    STATUS                                             VARCHAR2(7)
    TEMPORARY                                          VARCHAR2(1)
    GENERATED                                          VARCHAR2(1)
    SECONDARY                                          VARCHAR2(1)
    SQL> column column_name format a30
      1  select column_name,constraint_name
      2  from user_cons_columns
      3  where table_name = 'COL1'
      4* and owner = 'SCOTT'
    COLUMN_NAME                    CONSTRAINT_NAME
    OBJECT_NO                      COL1_PK_OBJID
    SQL>
    also go through
    http://www.dizwell.com/prod/node/65
    Message was edited by:
    user52

  • How can I change a column name in table (JDeveloper 10.1.3.3)?

    I'd like to change a table column name, for example instead of "FirstName" I'd like "Name".
    Here is the preview: http://img208.imagevenue.com/img.php?image=86575_firstname_122_578lo.JPG
    Thank You in advance!

    Now I have following problem: When I change "Label text" to column which has "Combo box" (Department insted of DepartmentId) I do not have my combo box anymore, just DepartmentId (Number). I have created binding... (DepartmentId -> Department Name) Why is this happening?
    http://img151.imagevenue.com/img.php?image=47670_firstname_122_862lo.JPG
    Can I change my attribute name in data model?
    BTW I use ADFBC Swing
    Sorry on my bad English ...
    thank you
    Message was edited by:
    user638810
    Message was edited by:
    user638810
    Message was edited by:
    user638810

  • Dynamically change the column name....

    Hi,
    I am facing a problem in displaying name of the columns dynamically as a parameter selected from the dashboard prompt.
    I have some facts which contains data according to the selected month (From Prompt).
    As of now the column names are:
    Curr, Next1, Next2, Next3 which displays the data for the months accordingly to the selected month from prompt.
    Data is coming correctly but on the report the column name are displayed as Curr, Next1, Next2 and Next3 which I want to be displayed as the month name for which it contains data.
    How can I do that? I have tried presentation variables to be used in custom heading but that is only as string.
    Thanks in advance !!!
    Regards,
    S Anand
    Edited by: S Anand on Nov 20, 2009 2:29 AM
    Edited by: S Anand on Nov 20, 2009 2:29 AM

    My scenario is little different, let me explain:
    My columns will remain same but values changes (based on column formula) according to the selected prompt value
    If I select 'Oct' from prompt then
    Curr will contain data for 'Oct' only
    Next1 will contain data for 'Nov' only
    Next2 will contain data for 'Dec' only
    Next3 will contain data for 'Jan' of next year only.
    Later if I select 'Jul' from prompt then
    Curr will contain data for 'Jul' only
    Next1 will contain data for 'Aug' only
    Next2 will contain data for 'Sep' only
    Next3 will contain data for 'Oct' only.
    I don't have different columns for each months but the columns are capable to reflect data for any month.
    So, how can I reflect the column name as month name for which that contains data.
    Regards,
    S Anand

  • Changing the Column names / alias

    Hi,
    I have an oracle query and it works fine.
    select q.sname,
    SUM( decode(p.nprofile1,10,1,0)) as "0 - 5",
    SUM( decode(p.nprofile1,9,1,0)) as "6 - 10",
    SUM( decode(p.nprofile1,8,1,0)) as "11 - 15",
    SUM( decode(p.nprofile1,7,1,0)) as "16 - 19",
    SUM( decode(p.nprofile1,6,1,0)) as "20 - 20",
    SUM( decode(p.nprofile1,5,1,0)) as "21 - 27",
    SUM( decode(p.nprofile1,4,1,0)) as "28 - 30",
    SUM( decode(p.nprofile1,3,1,0)) as "31 - 40",
    SUM( decode(p.nprofile1,2,1,0)) as "41 - 45",
    SUM( decode(p.nprofile1,1,1,0)) "46 - Over",
    COUNT(q.sname) "TOTAL"
    from task_core@cds t, cor_queue q, profile_core@crb p
    where t.nmboxid = q.nmboxid
    and p.ncodaid = t.nobjectid
    and p.ntype=2
    GROUP BY q.sname
    ORDER BY q.sname
    It generates a Cross-tab sort of result and I am using the decode function to generate the result.
    My problem is that right now I am using hardcoded column names or alias for the columns generated by the decode function. eg. "0-5", "6-10" etc.
    I have another table which contains these values ("0-5","6-10"). I would like to know instead of hard coding the column names like
    SUM( decode(p.nprofile1,10,1,0)) as "0 - 5"
    can we retrieve the values from the Other table that contains the values "0-5","6-10" etc and display it there in the decode function?
    Pls help me with this issue
    Thanks
    Gilles

    hi,
    the column names are always fixed. You can try dynamic sql in pl/sql or spool then execute, but in pure sql, it is not possible

  • Changing the Column Name in Criteria is not reflected on the Column Selecto

    When we rename the column name in the Criteria, it is not being reflected on the Column Selector drop down list.

    Since you have to add the columns from the presentation layer to the column selector view, my guess is you would have to rename the columns at the presentation layer to accomplish that.

  • Dynamic Change Of Column Name based On The Dashboard Prompt in OBIEE 10g

    Hi All,
    I have a dashbord prompt called "calendar date". And, my report having some columns called "Product Name", "Code", "Yest Balance", "Today Balance". Now, while displaying the report in the dashboard, instead of "Today's Balance" they want to see the date which we have selected in the promt as a column name (each time we select a date in the promt, that would appear as a field name in stead of "Today's Balance" but values will be same (should show the balance for that date).
    Please advice.
    Thanks,
    BK.

    yeah...you are correct....these are workaround ...no out of box solution.
    Take the MAR11 target example in this current month is MAR 11 is populated by a session variable which gives you always current month.
    Second using union -combined query creating a header from one report and results from other report.
    But, coming to your req.......what ever the value selected in the calendar date that should come up in the column heading. so this is not possible with variable because for date of calendar image type you can not set a presentation variable. If not you can use a REQUEST VARIABLE.
    You can try 2nd way creating 2 reports one for header other for value.
    You can choose based on your flexibility. Instead you are showing the report along with prompt. I would suggest use appropriate name as 'selected date value'.

Maybe you are looking for

  • Open multiple indd docs through SDK

    Hi guys How can I open multiple indesign documents found in a folder chosen through a folder chooser? I need to open each indesign doc in that folder and do some modification on each. Here is what I have already written. Now how do I proceed please S

  • PDF that doesn't start as a Word document

    I need to design a pdf that is fillable and has a signature option but I want to design it as a PDF and not keep changing it in the Word file. Is this possible to make it a one-step process instead of converting from Word each time? Is Form Central o

  • Font problem in excerpts on blog page

    Hi everyone! When I create a new blog entry, the font style that I choose is fine on the entries page, but not reflected in the excerpt on the main blog page. This wouldn't be a problem except that I and many of my readers are sight-impaired, and the

  • DDL for DBMS_SCHEDULER job

    How do I generate the DDL for an existing DBMS_SCHEDULER job? I've tried using DBMS_METADATA.GET_DDL, but that doesn't seem to work with the scheduler jobs.

  • Ld: fatal: unknown file type

    I am trying to link against a shared object which is created earlier in the build, and am getting the following error: ld: fatal: file /export/home/torpey/MXLib.sunws/lib/libWkr.so: unknown file type The error is not documented anywhere that I can fi