
260 ◾ Cloud Database Development and Management
3. To verify that the trigger prevents a class not listed in table CLASS from being entered
in the table STUDENT_CLASS, enter the following SQL statement to insert the class
1007 for the student with the id 10:
INSERT INTO STUDENT_CLASS
VALUES (10, 1007, NULL)
4. Highlight the code and click Run. As shown in Figure 7.31, the trigger Class_Checking
prevents the class 1007 from being entered to the STUDENT_CLASS table because it
is not listed in the CLASS table.
5. In contrast, if a class does exist in the CLASS table, the trigger will allow it to be
inserted to the STUDENT_CLASS table (Figure ...