remove the column

Hi all

I want to remove a column from a table, but the column have already given.
can someone help me? The column also is een FK.

ALTER TABLE test_table
DROP COLUMN test_column

Edited by: sake1 7 February 2012 08:16

Your ALTER TABLE table_name DROP COLUMN column_name; command should work.

Have you tried to use it? You have an error?

Tags: Database

Similar Questions

  • Remove the column from the compressed tables

    NLSRTL11.2.0.3.0Production
    Oracle Database 11g Enterprise Edition11.2.0.3.064 bit Production
    PL/SQL11.2.0.3.0Production
    AMT for Linux:11.2.0.3.0Production

    Hello

    I read on how to do to remove a compressed table column - first set unused and then drop unused columns. However, in the example below on the basis of data, I ran it, it does not work. Please, can you tell me WHEN this approach does not work. What is dependent on - settings or something else. Why can't I drop unused columns?

    And the example and errors:

    create table tcompressed compress in select * from all_users;

    > TCOMPRESSED table created.

    ALTER table tcompressed add x number;

    > table TCOMPRESSED altered.

    ALTER table tcompressed drop the x column;

    >

    Error report:

    SQL error: ORA-39726: unsupported operation column add/drag on compressed tables

    39726 00000 - "operation column add/drop not supported on compressed tables. ''

    * Cause: Not support add/column operation move compressed tables

    elapse.

    * Action: When adding a column, do not specify a default value.

    DELETE column is only supported in a column SET UNUSED

    (remove the column metadata).

    ALTER table tcompressed unused column of the set x;

    > table TCOMPRESSED altered.

    ALTER table tcompressed drop unused columns;

    >

    Error report:

    SQL error: ORA-39726: unsupported operation column add/drag on compressed tables

    39726 00000 - "operation column add/drop not supported on compressed tables. ''

    * Cause: Not support add/column operation move compressed tables

    elapse.

    * Action: When adding a column, do not specify a default value.

    DELETE column is only supported in a column SET UNUSED

    (remove the column metadata).

    As you can see even after changing the table defining the column as unused X I still can't drop by DROP UNUSED COLUMNS.

    Thank you.

    If you enable compression for all operations on a table, you can delete the columns in the table. If you enable compression for the only direct-path inserts, you can't remove columns.

  • Remove activate them, deactivate and remove the columns of searchUser.do

    Hello
    What form of jsp I have to modify to remove the option activate, deactivate and remove the columns on the searchUser.do page? I edited tjspSearchUserResultsTiles.jsp but who do not appear to do.
    Thank you

    To do this, you will need to customize JSP. It includes TableGenerator.jsp, so you will need to write your logic here to hide these buttons or you will need to write your own JSP and put it instead of tjspSearchUser.jsp

  • remove the column in csv

    No one knows how to delete a column, or changing the values in this column and leave the rest in a csv file?

    Example:

    CSV file has 70 rows and 40 columns. To remove a column or change its values.

    Thanks in advance.

    Yes, I did a quick VI, which is a combination of the cross and methods Happies, takes the whole CSV in memory in the form of a table and it then passes out CSV again to another. If you want to make any changes to the CSV just deal with it even as you would a table when she goes from one CSV to another.

  • Remove the column space

    Hi, just wanted to help regarding the deletion of my user name column spaces. I used the following code to remove the double space to a single space.
    regexp_replace(table_a.username, ' {2,}', ' ')
    but when you look through my answers I noticed that there is an extra in a few names at the end of the field as well. The original double space was between first name and family name, but now I have to replace the space completely, but don't know how.

    If someone could please advise.

    Thanks in advance.
    with t as (
               select 'ABC         DEF   ' str from dual
              )
    select  regexp_replace(str,' *( |$)','\1')
      from  t
    /
    
    REGEXP_
    -------
    ABC DEF
    
    SQL> 
    

    SY.
    P.S. It does not remove the spaces to the left, just backwards.

    SY.

  • Using substitution variables to remove the columns of v11.1.2.1

    We have several forms that have the version 11.1.1.1 the & FcYear (projected year) and periods of time in the direction of the column. For periods of time, I select:
    & Mth01
    & Mth02
    & Mth03
    & Mth04
    & Mth05
    & Mth06
    & Mth07
    & Mth08
    & Mth09
    & Mth10
    & Mth11
    & Mth12
    Yeartotal

    Currently all the & Mth vars are on Nov except for & Mth12 tends to decrease. What which reached in V11.1.1.1 is a form where the actual months disappear to the & FcYear year door. In other words, in V11.1.1.1 a form designed like that, now only shows Nov, Dec and YearTotal for FY11. However in V11.1.2.1 it displays Nov 11 times, and then decrease, then YearTotal!

    So my question is: are there at - it a setting I'm missing in the forms V11.1.2.1 Designer to say the form to remove repetitions?

    See you soon

    Published by: user964802 on November 2, 2011 14:40

    Hello
    It is a correction of a bug. Take a look at the post below:
    Re: Working capital forecast form design (column replication as a data)

    See you soon,.
    Alp

  • remove the column in a report interactiv

    Hello

    I wish I had a column in a report interactiv remove the line
    with an X or a "delete" or...
    is this possible?
    or how is this possible?

    concerning
    Markus

    Hi Markus,.

    I made a request for the PRICE of the APEX ORACLE in Germany this year with exactly this feature in it.

    Here is the link http://apex.oracle.com/pls/otn/f?p=25500:1

    Connection with a connection name: comments and password: apexuser
    On the first page, you can see IR go on the Details button and you get routed to another page. You will find what you need in action. You can also download this sample application: http://www.oracle-apex-award.de/TIA-Technische-Infrastruktur.70.0.html

    Unfortunately, the application is in German. I hope you understand.

    HOWTO:

    Go to report attributes > column attributes and change the values for:

    Link text: < img src = "" #WORKSPACE_IMAGES #tmp_user_delete.png "alt ="delete contact"> / / for the photo"
    Target: URL
    URL: JAVASCRIPT:CONFIRMDELETEGET(HTMLDB_DELETE_MESSAGE,'F?) P = & APP_ID.: 8: & SESSION.: P8_ACTION_DELETE: #ID #');

    Go to the Page change, and change the HTML header:

    < script language = "JavaScript" type = "text/javascript" >

    htmldb_delete_message = "'DELETE_CONFIRM_MSG" ";

    function confirmDeleteGET (msg, url) {}
    var confDel = msg;
    confDel = confirm ("do this action you want to delete?");
    If (confDel == true) {redirect (url) ;}}

    < /script >

    Now add a process before header

    Under source:
    Start
    delete the files where id =: P8_ACTION_DELETE;
    commit;
    : P8_ACTION_DELETE: = ";
    end;

    Under conditional processing
    Type: PL/SQL Expression
    Expression1: P8_ACTION_DELETE IS NOT NULL

    Greetings,

    Tobias

  • Anyway, to remove the column names in the result of the query of SQLPLUS

    Hello

    I am using sqlplus to run a script that returns results with the column names.

    Anyway is to omit the names of columns in the result of the sqlplus query?

    I would like to have only results with their column names in the output.

    Thanks in advance!

    Hello

    Maybe your LINES (IZE) is not defined?

    SCOTT>set lines 130
    SCOTT>select status, machine, module
      2    from v$session
      3   where upper(username) = 'SCOTT';
    
    STATUS   MACHINE                                                          MODULE
    -------- ---------------------------------------------------------------- ------------------------------------------------
    INACTIVE PFAE3\VPC4894-03                                                 TOAD 9.7.2.5
    ACTIVE   PFAE3\VPC4894-03                                                 SQL*Plus
    
    2 rows selected.
    
    SCOTT>
    

    As an alternative to the linesize parameter, you can format the columns:

    SCOTT>set lines 80
    SCOTT>col status for a8
    SCOTT>col machine for a30
    SCOTT>col module for a30
    SCOTT>select status, machine, module
      2    from v$session
      3   where upper(username) = 'SCOTT';
    
    STATUS   MACHINE                        MODULE
    -------- ------------------------------ ------------------------------
    INACTIVE PFAE3\VPC4894-03               TOAD 9.7.2.5
    ACTIVE   PFAE3\VPC4894-03               SQL*Plus
    
    2 rows selected.
    
    SCOTT>
    

    Concerning
    Peter

  • I want to remove the column from the toolbar of bookmarks on my front page.

    A column of bookmarks toolbar appeared on the left side of my cover page for an unknown reason. I want to remove it because it shortens the width of my front page and I have no use for him. I have bookmarks in the menu at the top of the page bar. I don't need this stupid toolbar on my home page.

    You can enable or disable the bookmarks bar via view > sidebar > Favorites (Ctrl + B)

    Press F10, or press the Alt key to bring up the 'Menu Bar' temporarily if the menu bar is hidden.

  • Remove the column from the table compress

    I try drop column from table DPRUEBA, with compression option:
    SQL>select * from v$version
      2  /
    
    BANNER                                                                
    ----------------------------------------------------------------      
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi      
    PL/SQL Release 10.2.0.4.0 - Production                                
    CORE     10.2.0.4.0     Production                                            
    TNS for Linux: Version 10.2.0.4.0 - Production                        
    NLSRTL Version 10.2.0.4.0 - Production                                
    
    5 filas seleccionadas.
    
    Transcurrido: 00:00:00.09
    SQL>
    SQL>CREATE TABLE DPRUEBA
      2    (COL1 NUMBER,
      3    COL2 NUMBER) COMPRESS
      4  /
    
    Tabla creada.
    
    Transcurrido: 00:00:00.06
    SQL>
    SQL>ALTER TABLE DPRUEBA DROP COLUMN COL2
      2  /
    ALTER TABLE DPRUEBA DROP COLUMN COL2
    *
    ERROR en línea 1:
    ORA-39726: operación de agregación/borrado de columnas no soportada 
    en tablas comprimidas 
    
    
    Transcurrido: 00:00:00.06
    Any idea?

    You can always do something like this

    SQL> CREATE TABLE DPRUEBA
      2   (COL1 NUMBER,
      3    COL2 NUMBER) COMPRESS
      4  / 
    
    Table created.
    
    SQL>
    SQL> ALTER TABLE DPRUEBA DROP COLUMN COL2
      2  /
    ALTER TABLE DPRUEBA DROP COLUMN COL2
                                    *
    ERROR at line 1:
    ORA-12996: cannot drop system-generated virtual column
    
    SQL>
    SQL> create table new_DPRUEBA
      2  as
      3  select col1
      4    from DPRUEBA
      5  /
    
    Table created.
    
    SQL>
    SQL> drop table DPRUEBA
      2  /
    
    Table dropped.
    
    SQL>
    SQL> rename new_DPRUEBA to DPRUEBA
      2  /
    
    Table renamed.
    
    SQL>
    SQL> desc DPRUEBA
     Name                                      Null?    Type
     ----------------------------------------- -------- ----------------------
     COL1                                               NUMBER
    
    SQL>
    SQL>
    SQL> drop table DPRUEBA
      2  /
    
    Table dropped.
    
    SQL>
    SQL> 
    

    Note: you must take care of the constraints and triggers, and others

  • Remove the type column

    Hi team,

    Can I know the syntax to move the type column. Example of

    create or replace TYPE T_PROV_ATTR IS OBJECT
       (ALLOCATED_GIFT_SEQ NUMBER(10)
       ,ICAP_ID NUMBER(10)
       ,MSISDN VARCHAR2(15)
       ,GIFT_ID VARCHAR2(15)
       ,EFFECTIVE_DATE DATE
       ,GIFT_START_DATE DATE
       ,GIFT_END_DATE DATE
       ,PROV_START_DATE DATE
       ,EXTERNAL_SYSTEM VARCHAR2(15)
       ,PAYMENT_IND CHAR(1)
       ,SUB_INT_SEQ NUMBER(10))
     alter type T_PROV_ATTR add attribute (GIFT_COST number(15))CASCADE
    

    I need to fall T_PROV_ATTR

    Use command below to remove the column of table:

    ALTER TABLE, DROP table column type_column

    If you want to remove an attribute of type, then use below command:

    ALTER T_PROV_ATTR DROP GIFT_COST ATTRIBUTE TYPE;

  • In Oracle SQL, select cannot use the column in the statement and order of

    Hello

    Is there a work around for this.

    Thanks in advance
    Pablo.

    Hello

    943981 wrote:
    Hi all

    This is the error I get:

    ORA-00960: column ambiguous naming in select list
    00960 00000 - "ambiguous column naming in select list".
    * Cause: A column name in the order by list corresponds to more than a select
    columns in the list.
    * Action: Delete columns duplicated naming in the selection list.
    Error on line: column 6:17

    This error message seems pretty clear to me. What don't you understand?

    Or the other
    (a) use aliases, so each column has a unique name, or
    (b) remove the columns duplicated of the SELECT clause.

    Post your query. It is difficult to tell exactly what you're doing wrong when we do not know exactly what you are doing.
    For best results, view a complete test (including CREATE TABLE and INSERT statements) script, if necessary that people can to recreate the problem and test their ideas.
    See the FAQ forum {message identifier: = 9360002}

  • Delete the name of the column in the CSV file generated by ODI

    Hello

    I want to remove the column names in the CSV file that I create the database.
    I tried to put "towards zero in the data store ', that I created for the csv file, but it does not work.

    Please help.

    Thank you
    Sudeep Nathalie

    Sudeep salvation,

    Ok.. If you don't want the column to be generated and then in your IKM (IKM SQL to THE grit file) choose the option GENERATE_HEADER to 'no '.

    Then run the interface. The target csv file will not now column header.

    Thank you
    Fati

  • Get the index of the column of table removed

    Is there a way to get the index of the column in a 2D table that has been deleted? In my application, the user has the possibility to use the right click option 'remove a column' on a 2D picture, but I would like to use this information to remove the same column in a different table programmatically. Is this possible?

    There is a file published in the documents of the community that refers to a location in a sheet of the user has clicked.  Use it like the image below.

    https://decibel.NI.com/content/docs/doc-22434

  • Can I remove Logical columns that I will not use in the layer of presentation as the id or foreign key columns?

    Hello

    Can I remove Logical columns at the level of the business layer that I'm not going to use the layer of presentation as the ID or foreign key columns? It will not affect the relations to the business layer?

    Kind regards

    Nestor

    Hi Nestor,.

    It won't unless they are used as keys, columns sort order, the ID column or the likes. But you can leave them in the MDB layer and expose just in the presentation layer - just in case you need it later. It is not use all the resources or generate overhead. More: Developer of the RPD should be used to work with loads of columns

Maybe you are looking for

  • If I use iPhoto and photo I use double cloud storage

    I seem to have iPhoto & Photo with virtually identical libraries.  If I get a notice that it is full of storage iCloud, will be eliminated one of the Aps of Photo. Give me more storage?  Or they share the same 'space '? Thank you

  • USB detects not unless rebooted Satellite C650

    Hello I have a laptop C650 6 - months old. Recently, I have USB problems. 1. If I turn on the laptop and insert USB key, it works very well. If I remove it and insert it, it does not work.Or if I insert another USB key at the same time. 2. the first

  • Prints dark

    I just bought a Selphy C1200 but my pictures are printing gray and dark, not bright and vivid colors I see on my phone and computer.  I have an all in one Canon printer that prints the bright and sharp images, but I wanted the small portable printer.

  • Cc of Photoshop causing the blue screen on windows 10 laptop

    HelloRecently, I installed Photoshop CC 2015 and signed up for the trial version. After installing it, it hangs on each load upward. I tried to reinstall and update my drivers without success. On the blue screen, I get the message "kernel security ch

  • My hyperlinks don't work

    When I try to preview or update my site, my hyperlinks don't work. Muse opens with the warning "(police) requires the restoration and contains a hyperlink. Will not work in the browser. ». I'm really confused, as these links worked previously. I have