Create a trigger called Trig_Enroll_BI on the ENROLLMENT table that fires before an INSERT statement. The trigger must generate a proper error message if the student id or section id or both invalid. Test your code for all possible options. Make sure that all columns that have NOT NULL values (Use system date for all date fields, user id for all created and modified by fields). Display the inserted record from the ENROLLMENT table after a successful enrollment transaction.

A Guide to SQL
9th Edition
ISBN:9781111527273
Author:Philip J. Pratt
Publisher:Philip J. Pratt
Chapter3: Creating Tables
Section: Chapter Questions
Problem 7SCG: The SERVICE_REQUEST table uses the CHAR data type for the DESCRIPTION and STATUS fields. Is there an...
icon
Related questions
icon
Concept explainers
Question

Create a trigger called Trig_Enroll_BI on the ENROLLMENT table that fires before an INSERT statement. The trigger must generate a proper error message if the student id or section id or both invalid. Test your code for all possible options. Make sure that all columns that have NOT NULL values (Use system date for all date fields, user id for all created and modified by fields). Display the inserted record from the ENROLLMENT table after a successful enrollment transaction.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Query Syntax
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
A Guide to SQL
A Guide to SQL
Computer Science
ISBN:
9781111527273
Author:
Philip J. Pratt
Publisher:
Course Technology Ptr
Oracle 12c: SQL
Oracle 12c: SQL
Computer Science
ISBN:
9781305251038
Author:
Joan Casteel
Publisher:
Cengage Learning
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781285196145
Author:
Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos Coronel
Publisher:
Cengage Learning
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781305627482
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning