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:Can a trigger be altered?
2:When a cursor is closed, can you reuse the name?
3:What command is used to retrieve the results after a cursor has been opened?
4:Are triggers executed before or after an INSERT, DELETE, or UPDATE?

Exercises

1:Using your implementation's system catalog tables, write the SQL that creates the following SQL statements. Substitute the name of an actual object for the object names.
  1. GRANT SELECT ON TABLE_NAME TO USERNAME;
    										
  2. GRANT, CONNECT, RESOURCE TO USERNAME;
    										
  3. SELECT COUNT(*) FROM TABLE_NAME;
    										
2: Write a statement to create a stored procedure that deletes an entry from the PRODUCTS_TBL table; it should be similar to the example used in this hour to insert a new product.
3: Write the statement that executes the stored procedure that you created in Exercise 2 to delete the row for PROD_ID '9999'.
..................Content has been hidden....................

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