Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Example of Merging Rows = MERGE INTO copy_empc USING employees e ON (c.employee_id e employee_id) WHEN MATCHED THEN UPDATE SET c.first_name e. first_name, c.last name

image text in transcribed

image text in transcribed

Example of Merging Rows = MERGE INTO copy_empc USING employees e ON (c.employee_id e employee_id) WHEN MATCHED THEN UPDATE SET c.first_name e. first_name, c.last name = e.last_name, c.email = e.email, c.phone_number e.phone_number, c.hire date = e.hire_date, c.job_id = e.job_id, c.salary = e. salary, c.commission_pct = e.commission_pct, c.manager_id e.manager_id, c. department_id = e. department_id WHEN NOT MATCHED THEN INSERT VALUES (e. employee_id, e. first_name, e.last_name, e.email, e.phone_number, e.hire_date, e.job_id, e.salary, e. commission_pct, e.manager_id, e. department_id); Activity 01: Create a table that has some fields similar to employees table. Then insert 5 rows to the new table. Afterwards, merge the new table and the employees table to a new table based on employee number. Activity 01: Create the EMP table based on the following table instance chart.. Name Null? Type ID NUMBER) LAST_NAME VARCHAR2(25) FIRST_NAME VARCHAR2(25) DEPT_ID NUMBER) a. Modify the EMP table to allow for longer employee last names. Confirm your modification. b. Create the EMPLOYEES2 table based on the structure of the EMPLOYEES table. Include only the EMPLOYEE_ID, FIRST_NAME, LAST_NAME, SALARY, and DEPARTMENT_ID columns. Name the columns in your new table ID, FIRST_NAME, LAST_NAME, SALARY, and DEPT_ID, respectively. c. Drop the EMP table. d. Rename the EMPLOYEES2 table as EMP. e. Drop the FIRST_NAME column from the EMP table. Confirm your modification by checking the description of the table

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Microsoft Visual Basic 2005 For Windows Mobile Web Office And Database Applications Comprehensive

Authors: Gary B. Shelly, Thomas J. Cashman, Corinne Hoisington

1st Edition

0619254823, 978-0619254827

More Books

Students also viewed these Databases questions

Question

Write formal and informal proposals.

Answered: 1 week ago

Question

Describe the components of a formal report.

Answered: 1 week ago

Question

Write formal and informal reports.

Answered: 1 week ago