Database Reference
In-Depth Information
Figure 7.23
Create stored procedure.
Figure 7.24
Alter stored procedure.
5. In the New Query pane, enter and execute the code for the trigger VerifyPrerequisite
and CalculateGPA given in the Application of Triggers section. hen, enter the
following SQL code in the New Query editor to execute the procedure Grade_
Change. Notice that before the execution of the procedure, the triggers on the table
STUDENT_CLASS are disabled because they may block the execution of the proce-
dure. he triggers can be enabled after the procedure is executed.
ALTER TABLE STUDENT_CLASS DISABLE TRIGGER VerifyPrerequisite,
CalculateGPA
GO
EXEC Grade_Change 10, 'A', 1005
6. Highlight the code and click Run . As shown in Figure 7.25, the message indicates that
the grade is changed for the class with the id 1005 taken by the student with id 10.
Search WWH ::




Custom Search