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
When the Cloud Chokes: How a Configuration Change Brought Downtime to Millions
- 3 November 2025
 - Software Engineering
 
Introduction It wasn’t a dramatic server explosion.It wasn’t a hacker breach.What brought down global services last week was arguably more insidious: a configuration change, a few milliseconds of added latency, and a ripple effect that exposed how fragile modern cloud dependency really is. On 29 October 2025, Microsoft acknowledged that a change in its Azure … Continue reading “When the Cloud Chokes: How a Configuration Change Brought Downtime to Millions”
Enteros for Financial Institutions: Uniting AI Performance Management, Observability, and Cloud FinOps for Operational Excellence
- 2 November 2025
 - Database Performance Management
 
Introduction In today’s fast-paced digital finance ecosystem, agility, scalability, and operational efficiency have become the cornerstones of competitiveness. From high-frequency trading systems to AI-driven fraud detection models, financial institutions rely heavily on massive data infrastructure and complex applications to deliver real-time insights and secure, personalized services. However, this digital transformation brings forth significant challenges — … Continue reading “Enteros for Financial Institutions: Uniting AI Performance Management, Observability, and Cloud FinOps for Operational Excellence”
Revolutionizing Manufacturing Efficiency with Enteros: Harnessing Generative AI, AI SQL, and Advanced Database Software for Smarter Performance Management
Introduction The manufacturing sector is undergoing one of the most transformative periods in its history. The rise of Industry 4.0 has ushered in a new era of digitalization—one defined by intelligent automation, IoT devices, robotics, and data-driven decision-making. Yet, at the heart of this revolution lies a critical challenge: managing, optimizing, and interpreting the ever-growing … Continue reading “Revolutionizing Manufacturing Efficiency with Enteros: Harnessing Generative AI, AI SQL, and Advanced Database Software for Smarter Performance Management”
Inside a Fintech Outage: How 200 Milliseconds of Latency Reshaped Risk
- 31 October 2025
 - Software Engineering
 
Introduction In fintech, performance isn’t just a technical metric — it’s a financial one.Transactions, pricing engines, credit scoring, fraud detection — they all run on milliseconds.But what happens when those milliseconds multiply? In mid-2025, a mid-tier digital lender experienced an unusual outage.Not a crash.Not downtime.Just slow time — an invisible 200 ms delay that rippled … Continue reading “Inside a Fintech Outage: How 200 Milliseconds of Latency Reshaped Risk”