Workshop

The following workshop is composed of a series of quiz questions and practical exercises. The quiz questions are designed to test your overall understanding of the current material. The practical exercises are intended to afford you the opportunity to apply the concepts discussed during the current hour, as well as build upon the knowledge acquired in previous hours of study. Please take time to complete the quiz questions and exercises before continuing. Refer to Appendix C, "Answers to Quizzes and Exercises," for answers.

Quiz

1:Use the EMPLOYEE_TBL with the following structure:
COLUMNDATA TYPE(NOT)NULL
LAST_NAMEVARCHAR2(20)NOT NULL
FIRST_NAMEVARCHAR2(20)NOT NULL
SSNCHAR(9)NOT NULL
PHONENUMBERNULL

LAST_NAMEFIRST_NAMESSNPHONE
SMITHJOHN3124567883174549923
ROBERTSLISA2321188573175452321
SMITHSUE4432219893178398712
PIERCEBILLY310239856317676390

What would happen if the following statements were run:

  1. insert into employee_tbl
    ('JACKSON', 'STEVE', '313546078', '3178523443'),
    										
  2. insert into employee_tbl values
    ('JACKSON', 'STEVE', '313546078', '3178523443'),
    										
  3. insert into employee_tbl values
    ('MILLER', 'DANIEL', '230980012', NULL);
    										
  4. insert into employee_tbl values
    ('TAYLOR', NULL, '445761212', '3179221331'),
    										
  5. delete from employee_tbl;
    										
  6. delete from employee_tbl;
    where last_name = 'SMITH';
    										
  7. delete from employee_tbl;
    where last_name = 'SMITH';
    and first_name = 'JOHN';
    										
  8. update employee_tbl
    set last_name = 'CONRAD';
    									
  9. update employee_tbl
    set last_name = 'CONRAD';
    where last_name = 'SMITH';
    										
  10. update employee_tbl
    set last_name = 'CONRAD';
    first_name = 'LARRY';
    										
  11. update employee_tbl
    set last_name = 'CONRAD';
    first_name = 'LARRY';
    where ssn = '313546078'
    										

Exercises

1:Go to Appendix E of this book, "INSERT Statements for Data in Book Examples." Run the INSERT statements to populate the tables that you created in Exercise 1 of Hour 3. When this has been accomplished, you should be able to better follow the examples and exercise questions in this book.
2:Using the EMPLOYEE_TBL with the following structure:
COLUMNDATA TYPE(NOT)NULL
LAST_NAMEVARCHAR2(20)NOT NULL
FIRST_NAMEVARCHAR2(20)NOT NULL
SSNCHAR(9)NOT NULL
PHONENUMBERNULL

LAST_NAMEFIRST_NAMESSNPHONE
SMITHJOHN3124567883174549923
ROBERTSLISA2321188573175452321
SMITHSUE4432219893178398712
PIERCEBILLY3102398563176763990

Write DML to accomplish the following:

  1. Correct Billy Pierce's SSN to read 310239857.

  2. Add Ben Moore, PHONE is 317-5649880, ssn is 313456789.

  3. John Smith quit; remove his record.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset