Multiple choice

Write the missing code for the Foreign Key constraint definition. Missing code is represented by *************** below. Hint: Foreign Key is to define for BID column in STUDENTS table on BRANCH_ID column in BRANCH table. CREATE TABLE BRANCH(
BRANCH_ID INT NOT NULL,
BRANCH_NAME VARCHAR2(20) NOT NULL,
PRIMARY KEY (BRANCH_ID) );

CREATE TABLE STUDENTS(
STUDENT_ID INT NOT NULL,
STUDENT_NAME VARCHAR2(25) NOT NULL,
AGE INT NOT NULL,
ADDRESS VARCHAR2(25) ,
MARKS INT,
BID INT *********************,
PRIMARY KEY (STUDENT_ID) );

  1. BID INT REFERENCES BRANCH(BRANCH_ID)

  2. BID INT FOREIGN KEY(BRANCH_ID)

  3. BID INT FOREIGN KEY CONSTRAINT (BRANCH_ID) TABLE BRANCH

  4. All the above 3 are correct

  5. Foreign Key Constraint or Referential integrity can not be defined along with the table definition

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

Yes, it is correct.