Can I add a new column to a composite primary key without dropping it?

Hi
I need to modify the composite primary key of a table so as to include an another additional column to it?
Can I do that without dropping the PRIMARY KEY constraint on the table?

user13410062 wrote:
Hi
I need to modify the composite primary key of a table so as to include an another additional column to it?
Can I do that without dropping the PRIMARY KEY constraint on the table?post results from ALTER TABLE command

Similar Messages

  • How can I add a new column in compress partition table.

    I have a compress partition table when I add a new column in that table it give me an error "ORA-22856: CANNOT ADD COLUMNS TO OBJECT TABLES". I had cretaed a table in this clause. How can I add a new column in compress partition table.
    CREATE TABLE Employee
    Empno Number,
    Tr_Date Date
    COMPRESS PARTITION BY RANGE (Tr_Date)
    PARTITION FIRST Values LESS THAN (To_Date('01-JUL-2006','DD-MON-YYYY')),
    PARTITION JUNK Values LESS THAN (MAXVALUE));
    Note :
    When I create table with this clause it will allow me to add a column.
    CREATE TABLE Employee
    Empno Number,
    Tr_Date Date
    PARTITION BY RANGE (Tr_Date)
    PARTITION FIRST Values LESS THAN (To_Date('01-JUL-2006','DD-MON-YYYY')),
    PARTITION JUNK Values LESS THAN (MAXVALUE));
    But for this I have to drop and recreate the table and I dont want this becaue my table is in online state i cannot take a risk. Please give me best solution.

    Hi Fahed,
    I guess, you are using Oracle 9i Database Release 9.2.0.2 and the Table which you need to alter is in OLTP environment where data is usually inserted using regular inserts. As a result, these tables generally do not get much benefit from using table compression. Table compression works best on read-only tables that are loaded once but read many times. Tables used in data warehousing applications, for example, are great candidates for table compression.
    Reference : http://www.oracle.com/technology/oramag/oracle/04-mar/o24tech_data.html
    Topic : When to Use Table Compression
    Bug
    Reference : http://dba.ipbhost.com/lofiversion/index.php/t147.html
    BUG:<2421054>
    Affects: RDBMS (9-A0)
    NB: FIXED
    Abstract: ENH: Allow ALTER TABLE to ADD/DROP columns for tables using COMPRESS feature
    Details:
    This is an enhancement to allow "ALTER TABLE" to ADD/DROP
    columns for tables using the COMPRESS feature.
    In 9i errors are reported for ADD/DROP but the text may
    be misleading:
    eg:
    ADD column fails with "ORA-22856: cannot add columns to object tables"
    DROP column fails with "ORA-12996: cannot drop system-generated virtual column"
    Note that a table which was previously marked as compress which has
    now been altered to NOCOMPRESS also signals such errors as the
    underlying table could still contain COMPRESS format datablocks.
    As of 10i ADD/SET UNUSED is allowed provided the ADD has no default value.
    Best Regards,
    Muhammad Waseem Haroon
    [email protected]

  • How can I add a new column to Grid view under Tests tab

    I understand in "ORACLE Test manager for web Applications", the Grid view under Tests tab should be customised.
    How can I add a new column to Grid view under Tests tab? Thanks Katherine

    I don't think this is possible.
    Regards,
    Jamie

  • How can I add a new column to an Attachments Table

    How can I add a new column to an Attachments Table??
    And I want to remove the usage column also!
    Thanks!

    I tried to remove the usage column doing this:
    OAAttachmentTableBean attachTable = (OAAttachmentTableBean)webBean.findChildRecursive("attachTable");
    if (attachTable != null)
    attachTable.findChildRecursive("UsageTypeColumn").setRendered(false);
    but I'm getting null pointer exception on "UsageTypeColumn"...
    :(

  • Can I add a new phone user to my itunes account without overriding my phone data?, can I add a new phone user to my itunes account without overriding my phone data?

    Can I add a new phone user to my itunes account without overriding my phone data?

    Read this
    http://support.apple.com/kb/HT1495

  • Can't add a new column to LCD table? Option there, just wont add it.

    I have a LCD form with a table in it. Im trying to simply add a new column to the table. The option is there but the column just wont appear after clicking add Column to Left. I selected a column, right clicked the space > Insert > Column to left. But wont intsert. The table object properties tab shows rows and colum numbers but they are grayed out.
    See screenshots:
    http://www.emermed.net/staging/forums...
    http://www.emermed.net/staging/forums...
    This is a dynamic table where a new row can be inserted using a button. Is that dynamic nature the issue? Id hate to undo all the dynamic flow and programming just to add a column then reapply everything.
    Thanks!

    Hi,
    You don't add columns in the Object > Table palette (Screenshot 2). I suspect that the problem is that there is not enough on the page (within the content area) to actually add the column. In Screenshot 1, if you look at the width of the highlighted column versus the space available to the right of the table, you will see that a column cannot be added due to space restrictions.
    Reduce the width of the highlighted column (temporarily), then add a column. Once added, you can resize the columns to match the page width.
    Hope that helps,
    Niall

  • Can we add a new column in report which is not in table.

    Hi All,
    Can we create a new column in report which is not in table.
    I have two columns in my table completion_date, manufacture_date. If the difference between the completion_date and manufacture_date is 0, -1, 1 then the new column of the report will say on time against each record or else will display late. Any suggestion how to proceed on this
    Regards
    Edited by: User_Apex on May 16, 2011 5:54 AM

    Standard report then, NOT an interactive report (which if you were using, you could build a computation and report on that)..
    Then the adding a column in the query would be your best best...
    Thank you,
    Tony Miller
    Webster, TX
    There are two kinds of pedestrians -- the quick and the dead.
    If this question is answered, please mark the thread as closed and assign points where earned..

  • Elements 11 vs 13: how can I add a new place tag to my PSE13 database without using the wretched and totally inadequate map technology  that Elements 13 wants to impose.

    HI,
    I have recently installed Elements 13 having used Elements 11.0 successfully to build a database of 30,000 plus images indexed by place, people, and photo date. Elements 11 allowed me to add new places which are meaningful to me but which are a complete mystery to the mapping technology of Elements 13. For example some years ago I lived in London in a road called Argyle Road. In elements 11 I could enter the place tag as Argyle Road. In Elements 13 I am required to locate Argyle Road on the map, but the map presupposes that the Argyle Road I am referring to is in Ealing in West London. It is not!
      I now live in a place called Broadsands but the Elements 13 Map places this 0.5 miles away from what I would describe as Broadsands.
      So the question: how can I add a new place tag to my database without using the wretched and totally inadequate map technology  that Elements 13 wants to impose.

    Thank you for your quick response, BalusC. I really appreciate your answer.
    Yes, you are right. If I manually code the same amount of those components in the JSF pages instead of generating them dynamically, the server will still run out of memory. That is to say, JSF pages might not accommodate a great deal of concurrent visiting. If I upgrade the server to just allow 1,000 teachers making their own test papers at the same time, but when over 2,000 students take the same questionnaire simultaneously, the server will need another upgrading. So I have to do what you have told me, using JS+DOM instead of upgrading the server endlessly.
    Best Regards, Ailsa

  • Add a new column in Agreement Items table control (ME31K/ME32K/ME33K)

    Hi guys,
    I have a big issue.
    How can I add a new column at Agreement Items table control (ME31K/ME32K/ME33K) level.
    Thanks a lot.

    I think i solved the problem . The single way to to that is to modify the SAP standard Screen.

  • Add a new column in Folder in Discoverer9i Administrator

    Hi,
    We are using Discoverer9i Administrator. Initially we have created a view and add this view in Discoverer Administrator. After somtime we have added two new columns in the view, but these new columns are not reflecting in Discoverer Administrator.
    I would like to know how can we add both these column in Discoverer in same folder without deleting and recreating the folder.
    Regards,
    Hassan

    Hi,
    Login as Discoverer Administrator, right click on the folder and select refresh. This should then prompt you to add the new columns to the folder.
    Rod West

  • How can I add the new AP license to HA 5508 WLC?

    Hi,
    My customer has two 5508 WLC in HA mode and these devices have 250 AP license. Customer bought 50 AP and 50 AP license. But I could not add the license to WLC! When I check the Management>Software Activation> tab there are only two options under the tab these are "Licenses" "License Usage". There is no "Command" option in there. Also I tried add on CLI but this error log appeared " !!!! Blocked: Changing License configurations on Secondary unit is blocked !!!! " 
    I think this is possible when disable the HA but is there anybody know this how can I add the new 50 AP license to HA WLC without disable the HA?
    Thanks,
    Burhan

    Hi,
    Thank you for your reply. 
    Yes I know the controllers synchronize with the enabled license and the 250 AP license bundled with two device there is no problem.
    I want to add new 50 AP license in addition 250 AP license. Because customer has 300 AP's.
    As I said, When I check the Management>Software Activation> tab there are only two options under the tab these are "Licenses" "License Usage". There is no "Command" option in there.
    Thanks,

  • How to add a new column as "Warehouse name" in Goods Receipt PO screen?

    Hi, Experts
    I hope to add a new column or just "display" warehouse name besides Whse column in Goods Receipt PO.  How can I do?
    Thanks

    still not work.
    Maybe I did something wrong in UDF definition. Please help to check.   Thanks
    I named UDF as WhseName, and set it as Alphanumeric and lengh is 20, structure is Regular. And all below check-boxes are not ticked.
    And in Goods Receipt PO screen, I marked the UDF as Visible and Active.
    Then I ALTSHIFF2 in the UDF fields, and FMS screen displayed.
    Then I chose the 3rd one: Search in Existing User-defined value According to Saved Query
    T05
    Auto Refresh when field changes is not ticked.

  • Add a new column to an "Insert Form" created by HTMLDB Wizard throws Error

    Hi,
    My table design has changed and I had to add 2 new columns.
    The corresponding Insert Form/Report/Update Forms created by the HTMLDB should now reflect the new columns that have been added.
    In report and update forms I did not have a problem but in the Insert form, under Edit Page Process I tried to change the sql and I get the below error
    "Encountered the symbol "end-of-file" when expecting one of the following: begin case declare end exception exit for goto if loop mod null pragma raise return select update while with "
    My Edit Page Process SQL is as below-(Last two columns are the NEW columns i.e CDPL and CDPLCA)
    insert into "L2ENTRIES"
    ("AUTONUML2E",
    "ROLLNO",
    "AWARDCODE",
    "ROLLCLASSCODE",
    "SURNAME",
    "FORENAME",
    "SEX",
    "DOB",
    "PPSNO",
    "M1",
    "M2",
    "M3",
    "M4",
    "M5",
    "M6",
    "M7",
    "M8",
    "M9",
    "M10",
    "M11",
    "M12",
    "M13",
    "M14",
    "M15",
    "M16",
    "FEES",
    "CNULLS",
    "CDUPPPS",
    "CROLL",
    "CAWARDS",
    "CMODULES",
    "CHECKCHAR",
    "CHECKNO",
    "VALIDPPS",
    "VALIDPPSUK",
    "PPSNOPAD",
    "CDPL",
    "CDPLCA")
    values (
    :P3_AUTONUML2E,
    :P3_ROLLNO,
    :P3_AWARDCODE,
    :P3_ROLLCLASSCODE,
    :P3_SURNAME,
    :P3_FORENAME,
    :P3_SEX,
    :P3_DOB,
    :P3_PPSNO,
    :P3_M1,
    :P3_M2,
    :P3_M3,
    :P3_M4,
    :P3_M5,
    :P3_M6,
    :P3_M7,
    :P3_M8,
    :P3_M9,
    :P3_M10,
    :P3_M11,
    :P3_M12,
    :P3_M13,
    :P3_M14,
    :P3_M15,
    :P3_M16,
    :P3_FEES,
    :P3_CNULLS,
    :P3_CDUPPPS,
    :P3_CROLL,
    :P3_CAWARDS,
    :P3_CMODULES,
    :P3_CHECKCHAR,
    :P3_CHECKNO,
    :P3_VALIDPPS,
    :P3_VALIDPPSUK,
    :P3_PPSNOPAD,
    :P3_CDPL,
    :P3_CDPLCA)
    It will be great if some one can assist me in this matter.
    Thanks.

    Resolved this by a simple ";" at the end of the insert sql.
    I did not think a ";" will be necessary because when you edit the page process a ";" is not visible.

  • Add a new column for WBS description

    Hi all
    how to Add a new column for WBS description and derive the value as per the FS
    anybody can provide document for this

    Hi ,
    In Table <b>PRPS</b>, alread you have short description field <b>POST1 and POSTU</b> for the WBS element, apart from that still if you want to include a feild for your own requirement , then create a structure and with the description field of your requirement and append that structure into PRPS table.
    Hope This Info Helps YOU.
    <i>Reward Points If It Helps YOU.</i>
    Regards,
    Raghav

  • Add a new column and the value

    I want to add a new column to a table with a single value for all rows of this column. for example, add a new column called 'sid' with the value of 'dbp'. can I use this statement?
    alter table ... add sid varchar(8) 'dbp';
    or I have to add first then update?

    SQL> alter table blah add (sid varchar2(8) default 'dbp');
    Table altered.
    SQL> select * from blah;
                    COL1 SID
                       1 dbp
                       2 dbp
                       3 dbpMessage was edited by: SomeoneElse
    (used OP's column name)

Maybe you are looking for