nerdexam
Oracle

1Z0-882 · Question #49

You have two tables: CREATE TABLE department ( Department_ID int unsigned NOT NULL auto_increment PRIMARY KEY, Department _Name varchar(12) NOT NULL ) ENGINE=InnoDB CREATE TABLE employee (…

The correct answer is C. Option C. See the full explanation below for the reasoning.

Question

You have two tables:

CREATE TABLE department ( Department_ID int unsigned NOT NULL auto_increment PRIMARY KEY, Department _Name varchar(12) NOT NULL ) ENGINE=InnoDB CREATE TABLE employee ( Employee_Number int unsigned NOT NULL PRIMARY KEY, Employee_Name varchar(10) NOT NULL, Department_ID int unsigned DEFAULT NULL, FOREIGN KEY (Department ID) REFERENCES Department (Department_ID) ON UPDATE SET NULL ON DELETE CASCADE ) ENGINE= InnoDB The tables have the data:

Department You execute the statement:

REPLACE INTO department (Department_ID, Department_Name) VALUES (1, `Admin'); What data is in the employee table after the statement?

Exhibits

1Z0-882 question #49 exhibit 1
1Z0-882 question #49 exhibit 2

Options

  • AOption A
  • BOption B
  • COption C
  • DOption D

How the community answered

(32 responses)
  • A
    6% (2)
  • B
    6% (2)
  • C
    75% (24)
  • D
    13% (4)

Community Discussion

No community discussion yet for this question.

Full 1Z0-882 Practice