nerdexam
Oracle

1Z0-883 · Question #81

Review the definition of the phone_list view. CHEATE OR REPLACE ALGORITHM=MERGE DEFINER= root'@localhost' SQL SECURITY DEFINER VIEW phone_list' AS SELECT e . id as id e . first_name AS first_name' e…

The correct answer is B. INSERT INTO employee_phone (emp_id, phone_no, type) VALUES (1, `555-8888','mobile'). See the full explanation below for the reasoning.

Question

Review the definition of the phone_list view. CHEATE OR REPLACE ALGORITHM=MERGE DEFINER= root'@localhost' SQL SECURITY DEFINER VIEW phone_list' AS SELECT e . id as id e . first_name AS first_name' e . last_name AS last_name' coalesce ( ph1.phone_no, --') AS office_no' coalesce (ph2 .phone_no, '--) AS cell_no' FROM employees e LEFT JOIN employee_phone ph1 ON ph1.emp_id = e.id AND ph1.type = office' LEFT JOIN employee_phone ph2 ON ph2 .emp_id = e.id AND ph2 .type = mobile' The tables employees and employee_phone are InnoDB tables; all columns are used in this view. The contents of the phone_list view are as follows:

Mysql> select * from phone_list; 1 row in set (0.00 sec) Which method can you use to change the cell_no value to `555-8888' for John Doe?

Options

  • ADELETE FROM phone_list WHERE first_name= John' and last_name= Doe';
  • BINSERT INTO employee_phone (emp_id, phone_no, type) VALUES (1, `555-8888','mobile');
  • CUPDATE phone_list SET cell_name 555-8888' WHERE first_name= John' and last_name= `Doe';
  • DUPDATE employee_phone SET phone_no= `555-8888' where emp_id=1;

How the community answered

(69 responses)
  • A
    4% (3)
  • B
    71% (49)
  • C
    16% (11)
  • D
    9% (6)

Community Discussion

No community discussion yet for this question.

Full 1Z0-883 Practice