Expanded Library

Triggers in Oracle

by Pankaj Jain

In this course, we will explore, in-depth, the DML and System triggers available with Oracle. We will discuss the use cases and guidance for trigger usage.

What you'll learn

In this course, we will talk extensively about Oracle Triggers. Triggers help us centralize table validations at the lowest level along with providing support for auditing and logging.

We will take an in-depth look at how to define:

  • Triggers
  • Trigger types
  • Row level triggers
  • Statement level triggers
  • Mutating triggers
We will take an in-depth look at both DML triggers as well as System triggers. We will also talk about Compound Triggers and look at various scenarios where triggers can be useful.

Table of contents

Course FAQ

What are Oracle triggers?

Oracle triggers let you create procedures that are automatically executed when a specific action or event occurs. So if an INSERT, UPDATE, or DELETE statement is issued against a specific table, it will trigger a certain other procedure to be executed.

What types of triggers are available in Oracle?

There are 5 different types of Oracle triggers:

  1. Statement triggers: DML statements on a specific table/view
  2. Row triggers: executes for each row affected by a DML statement
  3. INSTEAD OF triggers: executes on views run rather than the issuing statement
  4. User event triggers: DDL statements like CREATE and ALTER, user LOGON, etc.
  5. System event triggers: database startup, shutdown, server erros, etc.
What will I learn in this course?

You will learn:

  • What Oracle triggers are and why use them
  • Row and Statement triggers
  • How to create triggers
  • Trigger dependencies
  • Trigger order and compound triggers
  • Trigger exceptions
  • Trigger scope
  • Trigger applications
  • Much more
What are the prerequisites to this course?

The only prerequisite for this course is to have some basic Oracle PL/SQL knowledge. Check out this course if you want a refresher, or if you still need to learn Oracle PL/SQL Fundamentals.

Who is this course for?

This course is for anyone who wants to learn how to set up triggers in Oracle; both DML triggers and system triggers. If you are an Oracle programmer, you will definitely find this course beneficial.

About the author

Pankaj Jain is an experienced technologist, with expertise in various aspects of software development lifecycle, architecting software solutions and software development. He has worked on an array of technologies, with focus on Oracle at the database layer and Java at the web tier. He is a certified Oracle 11g DBA. He lives in Seattle with his wife Simita and boys Ronit and Rohak. When he is not playing with technology, he likes spending time with his kids, travelling and doing photography.

Ready to upskill? Get started