Preamble
In this tutorial you will learn how to create an AFTER UPDATE trigger (after updating) in Oracle with syntax and examples.
Oracle executes (excites) the AFTER UPDATE trigger after running the UPDATE operator.
AFTER UPDATE trigger syntax
CREATE [ OR REPLACE ] TRIGGER name_trigger
AFTER UPDATE
ON table_name
[ FOR EACH ROW ]
DECLARE
- variable declaration
BEGIN
- trigger code
EXCEPTION
WHEN ...
- emergency handling
END;
Parameters or arguments
- Trigger_name – The name of the trigger to be created.
- AFTER UPDATE – indicates that the trigger is triggered after the UPDATE operator is executed.
- table_name – The name of the table for which the trigger was created.
Restrictions
- You cannot create a trigger in views.
- You cannot update :NEW (new) values.
- You cannot update :OLD (old) values.
Example
Let’s take an example of how to create an AFTER UPDATE trigger using the CREATE TRIGGER construction.
If you have created a table of the following structure:
CREATE TABLE orders
(order_id number(5),
number(4),
cost_per_item number(6,2),
total_cost number(8,2)
);
Then we will create the AFTER UPDATE trigger as follows:
CREATE OR REPLACE TRIGGER orders_after_update
AFTER UPDATE
ON orders
FOR EACH ROW
DECLARE
v_username varchar2(10);
BEGIN
-- Find the person username running UPDATE in the table
SELECT user INTO v_username
FROM dual;
-- Insert a row in the audit table
INSERT INTO orders_audit
( order_id,
quantity_before,
quantity_after,
username )
VALUES
( :new.order_id,
:old.quantity,
:new.quantity,
v_username );
END;
About Enteros
Enteros offers a patented database performance management SaaS platform. It proactively identifies root causes of complex business-impacting database scalability and performance issues across a growing number of clouds, RDBMS, NoSQL, and machine learning database platforms.
The views expressed on this blog are those of the author and do not necessarily reflect the opinions of Enteros Inc. This blog may contain links to the content of third-party sites. By providing such links, Enteros Inc. does not adopt, guarantee, approve, or endorse the information, views, or products available on such sites.
Are you interested in writing for Enteros’ Blog? Please send us a pitch!
RELATED POSTS
What Drives Growth in Fashion Tech: Enteros AI SQL, Database Performance Management, and RevOps Intelligence
- 3 March 2026
- Database Performance Management
Introduction The fashion industry has evolved into a digital-first, data-intensive ecosystem. Global apparel brands, luxury houses, direct-to-consumer startups, and fast-fashion giants now compete not just on design and brand—but on digital performance. E-commerce platforms must handle flash sales without crashing. Omnichannel inventory systems must synchronize in real time. AI-driven personalization engines must respond instantly. Pricing … Continue reading “What Drives Growth in Fashion Tech: Enteros AI SQL, Database Performance Management, and RevOps Intelligence”
Who Should Use Enteros for Financial Performance Optimization and Cloud Cost Governance?
Introduction The financial sector is under relentless pressure to grow—without increasing risk, cost, or operational complexity. Digital-first banks are reshaping customer expectations. Capital markets firms demand real-time analytics. Insurers are automating underwriting and claims. Fintech startups scale at cloud speed. Meanwhile, regulatory requirements intensify, margins tighten, and infrastructure costs rise. At the center of all … Continue reading “Who Should Use Enteros for Financial Performance Optimization and Cloud Cost Governance?”
How to Accelerate Banking Growth with Enteros Performance Management and Generative AI
- 2 March 2026
- Database Performance Management
Introduction The banking industry is evolving at unprecedented speed. Digital-first challengers are redefining customer expectations. Legacy institutions are modernizing core systems. Real-time payments, open banking frameworks, AI-driven fraud detection, and personalized financial services are now standard. But beneath every digital innovation lies a critical truth: Banking growth depends on performance. Read more”Indian Country” highlights Enteros … Continue reading “How to Accelerate Banking Growth with Enteros Performance Management and Generative AI”
What Drives Profitability in Fashion Tech: AI SQL, Cost Attribution, and Database Governance with Enteros
Introduction The fashion industry has transformed into a digital-first ecosystem. Global apparel brands, luxury retailers, direct-to-consumer startups, and fast-fashion giants now rely on sophisticated technology stacks to power: E-commerce platforms Omnichannel inventory systems Read more”Indian Country” highlights Enteros and its database performance management platform *Real-time pricing engines Demand forecasting models Supply chain visibility tools Read … Continue reading “What Drives Profitability in Fashion Tech: AI SQL, Cost Attribution, and Database Governance with Enteros”