DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: foreign keys constraint????

  1. #1
    Join Date
    Oct 2000
    Posts
    90

    Question

    Hello,
    Can any body answer these questions in the order they appear please?

    1.Can you insert into a table that has foreign key constraint without doing anything to the primary key? I have a table that has foreign key columns, can any one tell me if I can insert into those columns without doing anything to the primary keys that are on another table?

    2. How doy find out what table is the foreign key referencing from. I have a table that has foreign key columns but I'm trying to find out where the primary keys that the foreign keys are referencing is located? I tried using DBA_CONSTRAINS, and DBA_CONS_COLUMNNS but it did not help.

    regards,
    dorothy

  2. #2
    Join Date
    Dec 2000
    Posts
    126
    to answer q2.
    visit [url]http://ora.dbasupport.com/oracle/scripts/Administration/Dependencies/[/url]

  3. #3
    Join Date
    Oct 2000
    Posts
    90
    thanks for the reply. I Have checked those scripts out. I just want you to give answers to my question #1 if you can.

    thanks,
    dorothy

  4. #4
    Join Date
    Jul 2000
    Location
    Amsterdam
    Posts
    234
    Hi dorothy

    Your question:
    Can you insert into a table that has foreign key constraint without doing anything to the primary key? I have a table that has foreign key columns, can any one tell me if I can insert into those columns without doing anything to the primary keys that are on another table?

    Yes you can as long as the inserted value is a value also present in the refered column from the other table.

    HTH

    Tycho




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width