Delete a user from a table whose name is a foreign key in other tables

Dear All;
I am trying to figure out an easy way to do this. I just recently took someone application who utilized 500 tables. I am trying to delete a user from a table called member_table. However, I am having problems doing so because the user name is a foreign key in other tables which has a relationship with this member_table. I really can't naviagte through all 500 different tables and start deleting the user from each table . hence, I would like to figure out a way to delete the user from the member_table without getting the error message
ORA - 02292 "Integrity Constraint (....) violated child record found

Unless you want to find and re-create all of the FK's that point to that field so you can make them ON DELETE CASCADE (note it is the FK not the PK that has that attribute), you will need to either delete that member id from each of the child tables individually or update each one individually to either null or some valid value in member_table before you can delete the id from member_table.
You can find all of the tables, and the corresponding column_name that have an FK relationship to memeber_table with the following:
SELECT c.table_name, col.column_name
FROM user_constraints c, user_cons_columns col
WHERE c.constraint_name = col.constraint_name and
      c.r_constraint_name = (SELECT constraint_name
                             FROM user_constraints
                             WHERE table_name = 'MEMBER_TABLE' and
                                   constraint_type = 'P') and
     c.constraint_type = 'R';If there are a lot of these, you could use something similar to generate the set of delete/update statements that would be needed.
John

Similar Messages

  • Is it possible to create foreign key from composite key in other table.

    SQL> desc PRODUCT_CONFIG_OPTION;
    Name Null? Type
    CONFIG_ITEM_ID NOT NULL VARCHAR2(20) --composite primary key
    CONFIG_OPTION_ID NOT NULL VARCHAR2(20) --composite primary key
    CONFIG_OPTION_NAME VARCHAR2(100)
    DESCRIPTION VARCHAR2(255)
    SEQUENCE_NUM NUMBER(18)
    LAST_UPDATED_STAMP TIMESTAMP(6)
    LAST_UPDATED_TX_STAMP TIMESTAMP(6)
    CREATED_STAMP TIMESTAMP(6)
    CREATED_TX_STAMP TIMESTAMP(6)
    SQL> DESC PRODUCT_CONFIG_ITEM;
    Name Null? Type
    CONFIG_ITEM_ID NOT NULL VARCHAR2(20)
    CONFIG_ITEM_TYPE_ID VARCHAR2(20)
    CONFIG_ITEM_NAME VARCHAR2(100)
    DESCRIPTION VARCHAR2(255)
    LONG_DESCRIPTION CLOB
    IMAGE_URL VARCHAR2(255)
    LAST_UPDATED_STAMP TIMESTAMP(6)
    LAST_UPDATED_TX_STAMP TIMESTAMP(6)
    CREATED_STAMP TIMESTAMP(6)
    CREATED_TX_STAMP TIMESTAMP(6)
    SQL> desc product;
    Name Null? Type
    PRODUCT_ID NOT NULL VARCHAR2(20)
    PRODUCT_TYPE_ID VARCHAR2(20)
    PRIMARY_PRODUCT_CATEGORY_ID VARCHAR2(20)
    MANUFACTURER_PARTY_ID VARCHAR2(20)
    FACILITY_ID VARCHAR2(20)
    INTRODUCTION_DATE TIMESTAMP(6)
    SUPPORT_DISCONTINUATION_DATE TIMESTAMP(6)
    SALES_DISCONTINUATION_DATE TIMESTAMP(6)
    SALES_DISC_WHEN_NOT_AVAIL CHAR(1)
    INTERNAL_NAME VARCHAR2(255)
    BRAND_NAME VARCHAR2(100)
    COMMENTS VARCHAR2(255)
    =========
    CREATE TABLE PROD_CONFIG_PROD_CONFIG_OPTION (
    PRODUCT_ID VARCHAR2(20),
    CONFIG_ITEM_ID VARCHAR2(20),
    CONFIG_OPTION_ID VARCHAR2(20),
    PAGE_NUM_TO NUMBER(18),
    ALTERNATE_PAGE_NUM_TO1 NUMBER(18),
    ALTERNATE_PAGE_NUM_TO2 NUMBER(18),
    ALTERNATE_PAGE_NUM_TO3 NUMBER(18),
    LAST_UPDATED_STAMP TIMESTAMP(6),
    LAST_UPDATED_TX_STAMP TIMESTAMP(6),
    CREATED_STAMP TIMESTAMP(6),
    CREATED_TX_STAMP TIMESTAMP(6),
    CONSTRAINT PK_PROD_CAT_CONFIG_MOD PRIMARY KEY (PRODUCT_ID),
    CONSTRAINT FK_PRODUCT_ID FOREIGN KEY (PRODUCT_ID) REFERENCES PRODUCT(PRODUCT_ID),
    CONSTRAINT FK_CONFIG_ITEM_ID FOREIGN KEY (CONFIG_ITEM_ID) REFERENCES PRODUCT_CONFIG_ITEM(CONFIG_ITEM_ID),
    CONSTRAINT FK_CONFIG_OPTION_ID FOREIGN KEY (CONFIG_OPTION_ID) REFERENCES PRODUCT_CONFIG_OPTION(CONFIG_OPTION_ID) )
    TABLESPACE DATA_SMALL
    i try to create this table if i omit 3rd foreign key constraint then table successfully created.but including trd foreign key constraint it return error "ORA-02270: no matching unique or primary key for this column-list"
    i checked everything is it possible to create foreign key from composite key in other table.

    And
    CONSTRAINT FK_CONFIG_OPTION_ID FOREIGN KEY (CONFIG_ITEM_ID,CONFIG_OPTION_ID) REFERENCES PRODUCT_CONFIG_OPTION(CONFIG_ITEM_ID,CONFIG_OPTION_ID)
    ?

  • Deletion of entries from a table whose name is controlled by Z program.

    Hi all,
    I have to delete all entries in a custom table whose "Name" has a certain pattern say ZDBTAB01, ZDBTAB02, etc.
    I arrive at the table name through ABAP code. But the statement
    "DELETE FROM tab_name" doesnot work where tab_name is a variable.
    Can anyone suggest a function module to perform this action..??
    Thanks.
    Regards,
    Senthil G.

    data : v_tabname ..... value 'ZXXX'
    delete from (v_tabname).
    It should work. Are you getting any error message as such.

  • How to do a select from a table whose name is saved in a field?

    Hello,
    This is an abap report.
    I need to do a select from a table whose name is saved in a field of Z* table.
    Like this..
    SELECT * FROM znodos.
       SELECT * FROM znodos-tabla.   "znodos-tabla contain the Z* table name
           move zodos-tabla-txtmd to.....
       endselect.
    endselect.
    Is this possible??
    Thanks

    Hi Ilie Aleman 
    Give variable name in ().. Variable name refers to variable which contains table name
    SELECT * FROM (znodos-tabla).
    Regards,
    Mohaiyuddin
    Edited by: Mohaiyuddin Soniwala on Jan 22, 2008 5:18 PM

  • How to perform a select op on a table whose name is contained by a variable

    I am using Oracle SQL*Plus client.
    declare
    tablename_var varchar(10); LOOK HERE
    date_var date;
    begin
    select sysdate
    into date_var
    from &tablename_var; LOOK HERE
    dbms_output.put_line('The system date is '||date_var);
    end;
    The above code prompts the user to enter a value for the variable tablename_var, once the user enters 'dual' on prompt... The system date is given as output.
    declare
    tablename_var varchar(10):='dual'; LOOK HERE
    date_var date;
    begin
    select sysdate
    into date_var
    from tablename_var; LOOK HERE
    dbms_output.put_line('The system date is '||date_var);
    end;
    This code fails and gives an error. I understand. Engine interprets it as... trying to perform a select operation on a variable, and says a table or a view is expected.
    Can someone please tell me what to do, to perform a select operation on a table whose name is contained by a variable, like above?

    Hi,
    Welcome to the forum!
    You need Dynamic SQL if the table- or column names are variables.
    Getting the current date isn't a good example; you could get that without a query simply by saying
    date_var := SYSDATE;Also, SELECT ... INTO will raise an error if the query does not return exactly 1 row.
    In the example below, let's get the latest entry_date from a given table:
    For example:
    declare
         tablename_var     varchar(10);
         date_var      date;
         sql_txt           VARCHAR2 (1000);
    begin
         tablename_var := 'table_x;
         sql_txt := 'select  MAX (entrydate)'
              || '  from  ' || tablename_var;
         dbms_output.put_line (sql_txt || ' = sql_txt');    -- Not essential, but recommended
         EXECUTE IMMEDIATE  sql_txt  INTO date_var;
         dbms_output.put_line ('The latest entry_date is ' || date_var);
    end;Dynamic SQL involves creating a string that contains the SQL statement. Displaying the string is purely optional, of course, but it's a very good idea when writing and de-bugging code. Remember to comment-out or delete the display before moving the code into Production.
    For an exercise, make the column name a variable, instead of the hard-coded entry_date.
    Edited by: Frank Kulash on Nov 5, 2009 9:20 AM

  • WWC-41742 or How to delete a user from wwsec_person$

    Hey all,
    We're syncing users from AD, and then doing WNA... that all works fine... but it hiccuped. Had a user got married, and somehow, it didn't just synch the user, up, but it created a new one with the new name. (same NT user ID, different DN)
    Not knowing that it would cause a problem we nuked the old user, but now we get WWC-41742 which says to delete the user from wwsec_person$... which I can't seem to do...
    SQL> delete from portal.wwsec_person$ where user_name='ANNAM';
    delete from portal.wwsec_person$ where user_name='ANNAM'
    ERROR at line 1:
    ORA-06510: PL/SQL: unhandled user-defined exception
    ORA-06512: at "PORTAL.WWCTX_SSO", line 1803
    ORA-06510: PL/SQL: unhandled user-defined exception
    ORA-06512: at "PORTAL.WWCTX_SSO", line 1637
    ORA-06502: PL/SQL: numeric or value error
    ORA-06512: at "PORTAL.WWCTX_SSO", line 1922
    ORA-06512: at "PORTAL.WWCTX_API", line 279
    ORA-06512: at "PORTAL.WWERR_API_ERROR", line 99
    ORA-06512: at "PORTAL.WWERR_API_ERROR", line 222
    ORA-06512: at "PORTAL.WWUTL_API_CACHE", line 7665
    ORA-06510: PL/SQL: unhandled user-defined exception
    ORA-06512: at "PORTAL.WWCTX_SSO", line 1803
    ORA-06510: PL/SQL: unhandled user-defined exception
    ORA-06512: at "PORTAL.WWCTX_SSO", line 1637
    ORA-06502: PL/SQL: numeric or value error
    ORA-06512: at "PORTAL.WWCTX_SSO", line 1922
    ORA-06512: at "PORTAL.WWCTX_API", line 279
    ORA-06512: at "PORTAL.WWERR_API_ERROR", line 99
    ORA-06512: at "PORTAL.WWERR_API_ERROR", line 222
    ORA-06512: at "PORTAL.WWUTL_API_CACHE", line 6301
    ORA-06510: PL/SQL: unhandled user-defined exception
    ORA-06512: at "PORTAL.WWCTX_SSO", l
    What am I missing?
    Ken

    I'm guessing you are trying to do this from a tool outside portal such as sqlplus, SQL Developer, Toad, ...? If so, I think it is hiccuping because you don't have a lightweight identity -- you need to be logged into portal to access that table. Two choices -- delete the entry via the DBA tab in navigator when logged in as an administrative user (portal or orcladmin for example) or set context in your database session by running "exec PORTAL.wwctx_api.set_context('portal','<portal's lighweight password>');. Note that password is the user password for portal when logging in the portal GUI, not the PORTAL schema password.
    Rgds/Mark M.

  • Using Powershell to delete all users from the Portal

    Summary
    This script will delete all users from the Portal except for Administrator and the Built-In Sync account.
    Based on Markus's "Delete a User" script.
    Useful when developing your system if you want to quickly clear out the data and start again.
    set-variable -name URI -value "http://localhost:5725/resourcemanagementservice' " -option constant
    function DeleteObject
    PARAM($objectType, $objectId)
    END
    $importObject = New-Object Microsoft.ResourceManagement.Automation.ObjectModel.ImportObject
    $importObject.ObjectType = $objectType
    $importObject.TargetObjectIdentifier = $objectId
    $importObject.SourceObjectIdentifier = $objectId
    $importObject.State = 2
    $importObject | Import-FIMConfig -uri $URI
    if(@(get-pssnapin | where-object {$_.Name -eq "FIMAutomation"} ).count -eq 0) {add-pssnapin FIMAutomation}
    $allobjects = export-fimconfig -uri $URI `
    –onlyBaseResources `
    -customconfig "/Person"
    $allobjects | Foreach-Object {
    $displayName = $_.ResourceManagementObject.ResourceManagementAttributes | `
    Where-Object {$_.AttributeName -eq "DisplayName"}
    if([string]::Compare($displayName.Value, "Administrator", $True) -eq 0)
    {write-host "Administrator NOT deleted"}
    elseif([string]::Compare($displayName.Value, "Built-in Synchronization Account", $True) -eq 0)
    {write-host "Built-in Synchronization Account NOT deleted"}
    else {
    $objectId = (($_.ResourceManagementObject.ObjectIdentifier).split(":"))[2]
    DeleteObject -objectType "Person" `
    -objectId $objectId
    write-host "`nObject deleted`n" $displayName.Value }
    Go to the FIM ScriptBox
    http://www.wapshere.com/missmiis

    The DeleteObject function opens and closes a connection for each object.  This approach is faster:
    http://social.technet.microsoft.com/wiki/contents/articles/23570.how-to-use-powershell-to-delete-fim-users-that-have-a-null-attribute-name.aspx
    Mike Crowley | MVP
    My Blog --
    Planet Technologies

  • How do i delete a user from my macbook pro?

    How do I delete a user from my macbook pro?

    If you've admin privileges and there are no files in the user account that you want to keep, just go to System Preferences>Users & Groups and unlock it with your admin password. Select the user that you want to delete and click on the minus button. You'll get a warning before you completely delete the user but once it's gone, it's gone.
    Clinton

  • Approval work folw while Deleting the user from user profile

    Hi
    I have a requirement like
    I configured AD as auto provisioned.
    How to configure approval workflow, when administrator deleting the user from user profile (xellerate form).
    FYI, Delete task assigned as undo task for the create user task
    Thanks
    Edited by: user11963802 on Dec 15, 2010 2:31 AM

    Create one approval workflow and create one Process Determination Rule like
    If
    Request Action == "Revoke"
    Attach this rule with RO.
    Hey sorry
    I shared the information for Revoking user from target Application.
    Hide Delete User button from JSP
    You can create Dummy Resource with Approval workflow for Deleting User. And after getting approval you can use DeleteUser API to delete user from OIM.
    Edited by: Rajiv Dewan

  • I successfully deleted a user from my MacBook through the Users and Groups window in System Preferences.  But now I cannot close the lock in the bottom left corner of the box.  When I click on it, I briefly see a word that I think says "reauthorizing" but

    I successfully deleted a user from my MacBook through the Users and Groups window in System Preferences.  But now I cannot close the lock in the bottom left corner of the box.  When I click on it, I briefly see a word that I think says "reauthorizing" but the word flashes too quickly to tell for sure.

    If you are admin.
    Try restarting your Mac.

  • How to create a foreign key for the table from two different tables?

    Hi All,
    I have a three table like below. In the below table SAMPLE_CONS_CHECK and SAMPLE_CONS2_CHECK will be having the primary key for NAME column. The same SAMPLE_CONS3_CHECK table also having the primary key for NAME column and forieign key for SAMPLE_CONS_CHECK and SAMPLE_CONS2_CHECK tables. See the below code 2
    code 1:
    CREATE TABLE SAMPLE_CONS_CHECK
            (NAME VARCHAR2(10),
            SERIES  VARCHAR2(5)
    CREATE TABLE SAMPLE_CONS2_CHECK
            (NAME  VARCHAR2(5),
             MODEL  NUMBER
    CREATE TABLE SAMPLE_CONS3_CHECK
            (NAME  VARCHAR2(5),
             MODEL_NO  NUMBER
            )code 2
    alter table SAMPLE_CONS_CHECK
    add constraint SAMPLE_CONS_CHECK_pk primary key (NAME)
    alter table SAMPLE_CONS2_CHECK
    add constraint SAMPLE_CONS2_CHECK_pk primary key (NAME)
    alter table SAMPLE_CONS3_CHECK
    add constraint SAMPLE_CONS3_CHECK_pk primary key (NAME)
    ALTER TABLE SAMPLE_CONS3_CHECK ADD
    CONSTRAINT SAMPLE_CONS3_CHECK_FK1 FOREIGN KEY
         NAME
    ) REFERENCES SAMPLE_CONS_CHECK
        NAME
    ) ON DELETE CASCADE;
    ALTER TABLE SAMPLE_CONS3_CHECK ADD
    CONSTRAINT SAMPLE_CONS3_CHECK_FK2 FOREIGN KEY
         NAME
    ) REFERENCES SAMPLE_CONS2_CHECK
        NAME
    ) ON DELETE CASCADE;From the above schenario i am able to insert the data to SAMPLE_CONS3_CHECK table. But the parent data is already available in the parent table. The problem is here two different constarints from two different tables. While inserting, it is checking from both the tables whether the parent is exist or not.
    How can i solve this problem? Can anyone halp me about this?
    Thanks
    Edited by: orasuriya on Aug 8, 2009 2:02 AM

    Actually the design is completely incorrect.
    What you say is
    I have
    'foo', 'foo series'
    'foo','foo model'
    'foo',666
    By virtue of table3 referring to both table1 and table2.
    This means you actually need to have 1 (one) table:
    'foo','foo series','foo model', 666
    And the 'problem' disappears.
    Sybrand Bakker
    Senior Oracle DBA

  • FOREIGN KEY CONSTRAINT 의 MASTER TABLE NAME 의 확인

    제품 : ORACLE SERVER
    작성날짜 : 1995-11-02
    FOREIGN KEY CONSTRAINT 의 MASTER TABLE NAME 의 확인
    ===================================================
    다음은 FOREIGN KEY CONSTRAINT 이름으로 REFERENCE 하는 TABLE
    (MASTER TABLE)을 찾는 SQL SCRIPT이다.
    col Primary_key_table format a20
    col Constraint_name format a20
    select a.object_name Primary_Key_table,
    c.name Constraint_name
    from dba_objects a,
    sys.cdef$ b,
    sys.con$ c
    where c.name = 'EMP_FOREIGN_KEY' -- CONSTRAINT NAME
    and b.con# = c.con#
    and b.robj# = a.object_id
    /

    The set of constraints as you show it is valid, but will likely result in a lot of violations since both child columns are larger than the parent. The Oracle 2256 error has nothing to do with data validation, nor with the different lengths of the columns. The documentation says
    02256, 00000, "number of referencing columns must match referenced columns"
    // *Cause: The number of columns in the foreign-key referencing list is not
    //         equal to the number of columns in the referenced list.
    // *Action: Make sure that the referencing columns match the referenced
    //          columns.Look at the actual statement that the client ran. It will be different than the one you posted. one of the two column lists will have more columns than the other.

  • Using FOreign key constraints on tables in database.

    I am student and novice in the field of ORACLE and PL/SQL and Database Creation. I had created a database consisting tables and got problem while applying foreign key constraints.
    CUST_MSTR
    CREATE TABLE "DBA_BANKSYS"."CUST_MSTR"("CUST_NO" VARCHAR2(10),
    "FNAME" VARCHAR2(25), "MNAME" VARCHAR2(25), "LNAME" VARCHAR2(25),
    "DOB_INC" DATE NOT NULL,      "OCCUP" VARCHAR2(25), "PHOTOGRAPH" VARCHAR2(25),
    "SIGNATURE" VARCHAR2(25), "PANCOPY" VARCHAR2(1),      "FORM60" VARCHAR2(1));
    (CUST_NO is PRIMARY KEY, )
    -- EMP_MSTR
    CREATE TABLE "DBA_BANKSYS"."EMP_MSTR"("EMP_NO" VARCHAR2(10),
    "BRANCH_NO" VARCHAR2(10), "FNAME" VARCHAR2(25), "MNAME" VARCHAR2(25),
    "LNAME" VARCHAR2(25), "DEPT" VARCHAR2(30), "DESIG" VARCHAR2(30));
    (EMP_NO is primary key )
    --NOMINEE_MSTR
    CREATE TABLE "DBA_BANKSYS"."NOMINEE_MSTR"("NOMINEE_NO" VARCHAR2(10),
    "ACCT_FD_NO" VARCHAR2(10), "NAME" VARCHAR2(75), "DOB" DATE,
    RELATIONSHIP" VARCHAR2(25));
    (NOMINEE_NO is primary key )
    --ADDR_DTLS
    CREATE TABLE "DBA_BANKSYS"."ADDR_DTLS"("ADDR_NO" NUMBER(6),
    "CODE_NO" VARCHAR2(10),      "ADDR_TYPE" VARCHAR2(1), "ADDR1" VARCHAR2(50),
    "ADDR2" VARCHAR2(50), "CITY" VARCHAR2(25), "STATE" VARCHAR2(25),
    "PINCODE" VARCHAR2(6));
    ( ADDR_NO is primary key )
    Problem: I want to apply foreign key constraints on ADDR_DTLS table so that Before inserting value in ADDR_DTLS table it must check, VALUE in ADDR_DTLS.CODE_NO must be PRESENT either in attribute value CUST_MSTR.CODE_NO or EMP_MSTR.CODE_NO or NOMINEE_MSTR.CODE_NO table .
    I applied the foreign key constraints using this syntax
    CREATE TABLE "DBA_BANKSYS"."ADDR_DTLS"("ADDR_NO" NUMBER(6),
    "CODE_NO" VARCHAR2(10),      "ADDR_TYPE" VARCHAR2(1), "ADDR1" VARCHAR2(50),
    "ADDR2" VARCHAR2(50), "CITY" VARCHAR2(25), "STATE" VARCHAR2(25),
    "PINCODE" VARCHAR2(6),
    constraints fk_add foreign key CODE_NO references CUST_MSTR. CODE_NO,
    constraints fk_add1 foreign key CODE_NO references EMP_MSTR. CODE_NO,
    constraints fk_add2 foreign key CODE_NO references NOMINEE_MSTR.CODE_NO);
    (foreign key)
    ADDR_DTLS.CODE_NO ->CUST_MSTR.CUST_NO
    ADDR_DTLS.CODE_NO ->NOMINEE_MSTR.NOMINEE_NO
    ADDR_DTLS.CODE_NO ->BRANCH_MSTR.BRANCH_NO
    ADDR_DTLS.CODE_NO ->EMP_MSTR.EMP_NO
    When I applied foreign key constraints this way, its gives a error called foreign key constraints violation. (I understand that, its searches the attribute value of ADDR_DTLS.CODE_NO in all the three tables must be present then the value will be inserted. But I want, if the value is in any of the three table then its should insert the value or its gives an error.)
    Please help me out, though i put the question and i want too know how to apply the forign key in this way. and is there any other option if foreign key implementation is not pssible.

    If you are on 11g you can use ON DELETE SET NULL:
    CREATE TABLE addr_dtls
    ( addr_no          NUMBER(6)  CONSTRAINT addr_pk PRIMARY KEY
    , addr_cust_no     CONSTRAINT addr_cust_fk    REFERENCES cust_mstr    ON DELETE SET NULL
    , addr_emp_no      CONSTRAINT addr_emp_fk     REFERENCES emp_mstr     ON DELETE SET NULL
    , addr_nominee_no  CONSTRAINT addr_nominee_fk REFERENCES nominee_mstr ON DELETE SET NULL
    , addr_type        VARCHAR2(1)
    , addr1            VARCHAR2(50)
    , addr2            VARCHAR2(50)
    , city             VARCHAR2(25)
    , state            VARCHAR2(25)
    , pincode          VARCHAR2(6) );In earlier versions you'll need to code some application logic to do something similar when a parent row is deleted, as otherwise the only options are to delete the dependent rows or raise an error.
    btw table names can be up to 30 characters and don't need to end with MSTR or DTLS, so for example CUSTOMERS and ADDRESSES might be more readable than CUST_MSTR and ADDR_DTLS. Also if the Customer/Employee/Nominee PKs are generated from a sequence they should be numeric.
    Edited by: William Robertson on Aug 15, 2010 6:47 PM

  • FOREIGN KEY CONSTRAINT의 MASTER TABLE을 REFERENCE하는 TABLE 찾기

    제품 : SQL*PLUS
    작성날짜 : 2003-12-17
    FOREIGN KEY CONSTRAINT의 MASTER TABLE을 REFERENCE하는 TABLE 찾기
    ================================================================
    Master table 이 dept2일 때, 이 테이블을 참조하는 table들을 찾는 SQL
    select x.table_name "reference table"
    from
    (select distinct r_constraint_name,table_name
    from all_constraints
    where constraint_type='R' ) x, all_constraints a
    where a.table_name = 'DEPT2'
    and x.r_constraint_name = a.constraint_name;

  • Foreign keys at the table partition level

    Anyone know how to create and / or disable a foreign key at the table partition level? I am using Oracle 11.1.0.7.0. Any help is greatly appreciated.

    Hmmm. I was under the impression that Oracle usually ignores indices on columns with mostly unique and semi-unique values and prefers to do full-table scans instead on the (questionable) theory that it takes almost as much time to find one or more semi-unique entries in an index with a billion unique values as it does to just scan through three billion fields. Though I tend to classify that design choice in the same category as Microsoft's design decision to start swapping ram out to virtual memory on a PC with a gig of ram and 400 megs of unused physical ram on the twisted theory that it's better to make the user wait while it needlessly thrashes the swapfile NOW than to risk being unable to do it later (apparently, a decision that has its roots in the 4-meg win3.1 era and somehow survived all the way to XP).

Maybe you are looking for

  • Empty iPod, unable to snyc

    i've had my iPod for 7 months, a few weeks ago i updated it, only to find that there was no music on it at all. i then tried to update it again, with the same to happen again. i then went on to the apple help site, which told me to manually sncy my i

  • How to restore an application from a computer to a iPod?

    How do I restore an application from itunes on my PC to my iPod?

  • IPhoto showing incorrect photos on iPhone "device" - help or feedback???

    I've been having this problem for months and alluded to it in a previous post. It has followed my iPhone during a migration from 3G to 3GS and I'm guessing it's a bad file, but not sure which one... When I plug my iPhone 3GS via USB cable iTunes and

  • Changing the chart scale from Vertical to Horzintal

    Hi , I am trying to build a bubble chart where the Horziontal Axis label shows the scale values horziontally when I filter on some values & for some values it shows vertically Now I want to keep all the scale  values horziontally for all tha filter v

  • Multi lingual...urgent

    Hi, We are in the process of developing a Multilingual portal. I have a login page which has some info about the company etc. How do I /where do I store this information and How to transalte to the corresponding lagauage's translation if I have the e