1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

Creating Foreign key to unique, not null is possible or not

Discussion in 'SQL PL/SQL' started by Puru, Oct 9, 2010.

  1. Puru

    Puru Forum Advisor

    Messages:
    32
    Likes Received:
    1
    Trophy Points:
    90
    Dear All,

    Is it possible to declare FORGIEN KEY (in child table) to UNIQUE or NOT NULL key (in Parent table)
     
  2. SBH

    SBH Forum Expert

    Messages:
    99
    Likes Received:
    6
    Trophy Points:
    160
    Location:
    Bangalore
    Foreign key in the child table can only refer to a unique or primary key of the parent table. To be noted that still foreign key alows nulls in child tables i.e. for no reference