SQL-Server Triggers  «Prev  Next»

SQL-Server Triggers - Quiz

Each question is worth one point. Select the best answer for each question.
 
1. By default, how many levels can triggers be nested?
Please select the best answer.
  A. 1
  B. 32
  C. 16
  D. Zero; they cannot be nested.

2. When does the Deleted temporary trigger table become populated?
Please select the best answer.
  A. With DELETE triggers only
  B. With DELETE and INSERT triggers
  C. With DELETE, UPDATE, and INSERT triggers
  D. With DELETE and UPDATE triggers

3. John creates a trigger on the Sales table. He is trying to enforce the business rule that no order can be created (inserted) with a total less than $20. However, it can be updated by a supervisor, if necessary. What must his code do to the Sales table if the test inside the trigger tries to insert an order with a total of $15?
Please select the best answer.
  A. Delete the row from the Inserted table.
  B. Delete the row from the Sales table.
  C. Do nothing; the trigger will do it automatically.
  D. Delete the row from both the Inserted and the Sales tables.

4. If you insert data into the Category table that has an INSERT trigger on it, what happens to the data when the trigger fires?
Please select the best answer.
  A. The data resides in the Inserted and the Category tables.
  B. The data resides in only the Inserted table.
  C. The data resides in only the Category table.
  D. The data resides in the Inserted and Deleted tables.

5. If you delete data from the Category table that has a DELETE trigger on it, what happens to the data when the trigger fires?
Please select the best answer.
  A. The data resides in the Deleted table and is removed from the Category table.
  B. The data resides in the Inserted and Deleted tables.
  C. The data is deleted from the Category table only.
  D. The data resides in only the Deleted table.
Correct answers:

Your Score: 0