Question: 5. Add additional column to EMPVIEWSAL by adding the column JOB_ID, plus for the column SALARY add 10% and rename the column as BONUS lastly

5. Add additional column to EMPVIEWSAL by adding the column JOB_ID, plus for the column SALARY add 10% and rename the column as BONUS lastly for column LASTNAME add the FIRSTNAME (note you should concatenate the LASTNAME and FIRSTNAME) then put a literal character string , in between the 2 columns and rename the column you concatenated as COMPLETE NAME.

How many rows now are there in EMPVIEWSAL? Why and why not?

6. Modify EMPVIEWSAL to not allow any DML operations. 7. Using the EMPVIEWSAL try to insert a new employee record is shown below: 105 CRUZ,ANNA 80000 AD_VP

Is adding Ms. Cruz successful? If no, what causes the database in not accepting this record?

8. Create a new view name as LEFTVIEW get the column, EMPLOYEE_ID, LASTNAME concatenated to FIRSTNAME (with , in between) rename the column as NAME, DEPARTMENT_ID (either from employees or departments table), DEPARTMENT_NAME, MANAGER_ID (either from employees or departments table). Make sure to join the table using LEFT OUTER join.

Who is/are the employee/s that is considered as left outer join of employees and departments table?

9. Try to delete all records in LEFTVIEW? Is it really possible to perform any DML in a view with join condition? Why and why not?

10. Create a new view name as FULLVIEW. Get the following column: MIN(LASTNAME) name as NAME, DISTINCT (MANAGER_ID) rename as Available Manager_id, COUNT (MANAGER_ID) rename as No. of Manager_id, and the SUM(SALARY) per job_id. Apply Full Outer Join

Do all possible way in order to create the FULLVIEW view, swapping the column is allowed.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!