Course Hero Logo

Write an insert statement to add jennier lawrences

This preview shows page 10 - 15 out of 21 pages.

3.9 Write an INSERT statement to add Jennier Lawrence's information to the EMP tableColumnValue:empno8385nameLAWRENCEjobACTORboss8182hiredate2012-08-28salary8500commNULLdeptno50Confirm that both Soderbergh and Lawrence are both in department 50 'Hollywood'.3.10 Write a query.to retrieve the employee number, name, their manager's employee number,department number and their department name for all employees in department 50.The President Mr King has decided to that number 50 is bad luck and want's the movie department to bedepartment number 60.3.11 Update the MOVIE department in the DEPT table so it is now department number (deptno)60.3.12 Rerun the query you wrote in 3.10. Is there any differences to your result set? Why?HINT: Because we had cascade on the foreign key constraint the change to the primary key has beenapplied to all foreign keys referencing the primary key.3.13 Change your query so that you return all employees in department (deptno) 60.Stephen Soderbergh has been fired over creative differences with the president of the company Mr King. MrKing has demanded that Soderbergh be deleted from the EMP table.3.14 Write the delete statement to remove Soderbergh from the EMP tableWhat happened? why did it happen?3.15. Update the record or records that need to be changed before we can delete Soderbergh fromthe Emp table, then delete Soderbergh from the EMP table.3.16 USING DDL Drop the DEPT, EMP, SALGRADE and BONUS tables in that order
11INFO20003-2017-S2-Lab50Section 4: Additional SQL to try:4.1 List the names of the departments on the second floor4.2 List the names of items delivered by each supplier. Arrange the report by supplier name, andwithin supplier name, list the items in alphabetical order.4.3 List the number of employees in each department.4.4 Whom does Todd manage?4.5 Find the first name of Sophie's boss.4.6 List the names of each manager and their employees arranged by manager's name andemployee's name within manager.4.7* Name the items delivered by at least two suppliers.4.8 Who earns the lowest salary?4.9 Find the department/s that sell at least 4 different items.4.10 Find the departments that have made 4 or more transactions and list how many transactionseach department has made.
12INFO20003-2017-S2-Lab5Appendix AData in the tablesDeliveryDepartment
Adapted from Watson 2002, Data Management, Wiley13EmployeeItemSaleSupplier
INFO20003T5S2201714Fig A. The Department Store Physical Model (rendered by MySQL Workbench)

Upload your study docs or become a

Course Hero member to access this document

Upload your study docs or become a

Course Hero member to access this document

End of preview. Want to read all 21 pages?

Upload your study docs or become a

Course Hero member to access this document

Term
One
Professor
N/A
Tags
Tutorial Material And Solution

Newly uploaded documents

Show More

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture