{"id":2906,"date":"2019-08-11T21:05:04","date_gmt":"2019-08-12T04:05:04","guid":{"rendered":"https:\/\/oracletutorial.com\/?page_id=2906"},"modified":"2025-06-01T07:50:49","modified_gmt":"2025-06-01T14:50:49","slug":"oracle-statement-level-triggers","status":"publish","type":"page","link":"https:\/\/www.oracletutorial.com\/plsql-tutorial\/oracle-statement-level-triggers\/","title":{"rendered":"Oracle Statement-level Triggers"},"content":{"rendered":"\n<p><strong>Summary<\/strong>: in this tutorial, you will learn how to use the <code>CREATE TRIGGER<\/code> statement to create a new statement-level trigger in the database.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id='introduction-to-oracle-statement-level-triggers'>Introduction to Oracle Statement-level triggers <a href=\"#introduction-to-oracle-statement-level-triggers\" class=\"anchor\" id=\"introduction-to-oracle-statement-level-triggers\" title=\"Anchor for Introduction to Oracle Statement-level triggers\">#<\/a><\/h2>\n\n\n\n<p>A statement-level trigger is fired whenever a trigger event occurs on a table regardless of how many rows are affected. In other words, a statement-level trigger executes once for each transaction.<\/p>\n\n\n\n<p>For example, if you update 1,000 rows in a table, then a statement-level trigger on that table would only be executed once.<\/p>\n\n\n\n<p>Due to its features, a statement-level trigger is not often used for data-related activities like auditing the data changes in the associated table. It&#8217;s typically used to enforce extra security measures on the kind of transaction that may be performed on a table.<\/p>\n\n\n\n<p>By default, the statement <code>CREATE TRIGGER <\/code>creates a statement-level trigger when you omit the <code>FOR EACH ROW<\/code> clause.<\/p>\n\n\n\n<p>Here is the basic syntax of creating a statement-level trigger:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"PostgreSQL SQL dialect and PL\/pgSQL\" data-shcb-language-slug=\"pgsql\"><span><code class=\"hljs language-pgsql\"><span class=\"hljs-keyword\">CREATE<\/span> &#91;<span class=\"hljs-keyword\">OR REPLACE<\/span>] <span class=\"hljs-keyword\">TRIGGER<\/span> trigger_name\n    {<span class=\"hljs-keyword\">BEFORE<\/span> | <span class=\"hljs-keyword\">AFTER<\/span> } triggering_event \n    <span class=\"hljs-keyword\">ON<\/span> <span class=\"hljs-built_in\">table_name<\/span>\n    &#91;FOLLOWS | PRECEDES another_trigger]\n    &#91;<span class=\"hljs-keyword\">ENABLE<\/span> \/ <span class=\"hljs-keyword\">DISABLE<\/span> ]\n    &#91;<span class=\"hljs-keyword\">WHEN<\/span> condition]\n<span class=\"hljs-keyword\">DECLARE<\/span>\n    declaration statements\n<span class=\"hljs-keyword\">BEGIN<\/span>\n    executable statements\n<span class=\"hljs-keyword\">EXCEPTION<\/span>\n    exception_handling statements\n<span class=\"hljs-keyword\">END<\/span>;<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-1\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PostgreSQL SQL dialect and PL\/pgSQL<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">pgsql<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>Note that the meanings of each clause are already explained in the trigger tutorial.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id='oracle-statement-level-trigger-example'>Oracle Statement-level Trigger example <a href=\"#oracle-statement-level-trigger-example\" class=\"anchor\" id=\"oracle-statement-level-trigger-example\" title=\"Anchor for Oracle Statement-level Trigger example\">#<\/a><\/h2>\n\n\n\n<p>We&#8217;ll use the table <code>customers<\/code> from the <a href=\"https:\/\/www.oracletutorial.com\/getting-started\/oracle-sample-database\/\">sample database<\/a> for the demonstration:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"144\" height=\"145\" src=\"https:\/\/www.oracletutorial.com\/wp-content\/uploads\/2017\/07\/customers-table.png\" alt=\"customers table\" class=\"wp-image-298\"\/><\/figure>\n\n\n\n<p>Suppose, you want to restrict users from updating the credit of customers from the 28th to the 31st of every month so that you can close the financial month.<\/p>\n\n\n\n<p>To enforce this rule, you can use this statement-level trigger:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-2\" data-shcb-language-name=\"PostgreSQL SQL dialect and PL\/pgSQL\" data-shcb-language-slug=\"pgsql\"><span><code class=\"hljs language-pgsql\"><span class=\"hljs-keyword\">CREATE<\/span> <span class=\"hljs-keyword\">OR REPLACE<\/span> <span class=\"hljs-keyword\">TRIGGER<\/span> customers_credit_trg\n    <span class=\"hljs-keyword\">BEFORE<\/span> <span class=\"hljs-keyword\">UPDATE<\/span> <span class=\"hljs-keyword\">OF<\/span> credit_limit  \n    <span class=\"hljs-keyword\">ON<\/span> customers\n<span class=\"hljs-keyword\">DECLARE<\/span>\n    l_day_of_month NUMBER;\n<span class=\"hljs-keyword\">BEGIN<\/span>\n    <span class=\"hljs-comment\">-- determine the transaction type<\/span>\n    l_day_of_month := EXTRACT(<span class=\"hljs-type\">DAY<\/span> <span class=\"hljs-keyword\">FROM<\/span> sysdate);\n\n    <span class=\"hljs-keyword\">IF<\/span> l_day_of_month <span class=\"hljs-keyword\">BETWEEN<\/span> <span class=\"hljs-number\">28<\/span> <span class=\"hljs-keyword\">AND<\/span> <span class=\"hljs-number\">31<\/span> <span class=\"hljs-keyword\">THEN<\/span>\n        raise_application_error(<span class=\"hljs-number\">-20100<\/span>,<span class=\"hljs-string\">'Cannot update customer credit from 28th to 31st'<\/span>);\n    <span class=\"hljs-keyword\">END<\/span> <span class=\"hljs-keyword\">IF<\/span>;\n<span class=\"hljs-keyword\">END<\/span>;\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-2\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PostgreSQL SQL dialect and PL\/pgSQL<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">pgsql<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>Let&#8217;s examine the trigger.<\/p>\n\n\n\n<p>First, create a new trigger <code>customers_credit_trg<\/code>. The <code>OR REPLACE<\/code> modifies the trigger if it already exists:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-3\" data-shcb-language-name=\"PostgreSQL SQL dialect and PL\/pgSQL\" data-shcb-language-slug=\"pgsql\"><span><code class=\"hljs language-pgsql\"><span class=\"hljs-keyword\">CREATE<\/span> <span class=\"hljs-keyword\">OR REPLACE<\/span> <span class=\"hljs-keyword\">TRIGGER<\/span> customers_credit_trg\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-3\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PostgreSQL SQL dialect and PL\/pgSQL<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">pgsql<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>Next, instruct the Oracle to fire the trigger only before update event for the <code>credit_limit<\/code> column of the <code>customers<\/code> table. If you update values in other columns rather than the credit_limit column, the trigger will not execute.<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-4\" data-shcb-language-name=\"PostgreSQL SQL dialect and PL\/pgSQL\" data-shcb-language-slug=\"pgsql\"><span><code class=\"hljs language-pgsql\"><span class=\"hljs-keyword\">BEFORE<\/span> <span class=\"hljs-keyword\">UPDATE<\/span> <span class=\"hljs-keyword\">OF<\/span> credit_limit  \n    <span class=\"hljs-keyword\">ON<\/span> customers\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-4\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PostgreSQL SQL dialect and PL\/pgSQL<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">pgsql<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>Then, declare a variable to hold the current day of the month:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-5\" data-shcb-language-name=\"PostgreSQL SQL dialect and PL\/pgSQL\" data-shcb-language-slug=\"pgsql\"><span><code class=\"hljs language-pgsql\"><span class=\"hljs-keyword\">DECLARE<\/span>\n    l_day_of_month NUMBER;\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-5\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PostgreSQL SQL dialect and PL\/pgSQL<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">pgsql<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>After that, get the current day of the month using the <a href=\"https:\/\/www.oracletutorial.com\/oracle-date-functions\/oracle-extract\/\"><code>EXTRACT()<\/code><\/a> function:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-6\" data-shcb-language-name=\"PostgreSQL SQL dialect and PL\/pgSQL\" data-shcb-language-slug=\"pgsql\"><span><code class=\"hljs language-pgsql\">l_day_of_month := EXTRACT(<span class=\"hljs-type\">DAY<\/span> <span class=\"hljs-keyword\">FROM<\/span> sysdate);\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-6\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PostgreSQL SQL dialect and PL\/pgSQL<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">pgsql<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>Finally, check if the current day of the month is between the 28th and 31st, and use the procedure raise_application_error to raise a user-defined error:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-7\" data-shcb-language-name=\"PostgreSQL SQL dialect and PL\/pgSQL\" data-shcb-language-slug=\"pgsql\"><span><code class=\"hljs language-pgsql\"><span class=\"hljs-keyword\">IF<\/span> l_day_of_month <span class=\"hljs-keyword\">BETWEEN<\/span> <span class=\"hljs-number\">28<\/span> <span class=\"hljs-keyword\">AND<\/span> <span class=\"hljs-number\">31<\/span> <span class=\"hljs-keyword\">THEN<\/span>\n    raise_application_error(<span class=\"hljs-number\">-20100<\/span>,<span class=\"hljs-string\">'Cannot update customer credit from 28th to 31st'<\/span>);\n<span class=\"hljs-keyword\">END<\/span> <span class=\"hljs-keyword\">IF<\/span>;\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-7\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PostgreSQL SQL dialect and PL\/pgSQL<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">pgsql<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<h3 class=\"wp-block-heading\" id='testing-the-oracle-statement-level-trigger'>Testing the Oracle statement-level trigger <a href=\"#testing-the-oracle-statement-level-trigger\" class=\"anchor\" id=\"testing-the-oracle-statement-level-trigger\" title=\"Anchor for Testing the Oracle statement-level trigger\">#<\/a><\/h3>\n\n\n\n<p>The following statement uses the <code><a href=\"https:\/\/www.oracletutorial.com\/oracle-basics\/oracle-update\/\">UPDATE<\/a><\/code> statement to increase the credit limit of all customers 10%:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-8\" data-shcb-language-name=\"PostgreSQL SQL dialect and PL\/pgSQL\" data-shcb-language-slug=\"pgsql\"><span><code class=\"hljs language-pgsql\"><span class=\"hljs-keyword\">UPDATE<\/span> \n    customers \n<span class=\"hljs-keyword\">SET<\/span> \n    credit_limit = credit_limit * <span class=\"hljs-number\">110<\/span>;\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-8\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PostgreSQL SQL dialect and PL\/pgSQL<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">pgsql<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>Oracle issued the following error:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-9\" data-shcb-language-name=\"PostgreSQL SQL dialect and PL\/pgSQL\" data-shcb-language-slug=\"pgsql\"><span><code class=\"hljs language-pgsql\">ORA<span class=\"hljs-number\">-20100<\/span>: Cannot <span class=\"hljs-keyword\">update<\/span> customer credit <span class=\"hljs-keyword\">from<\/span> <span class=\"hljs-number\">28<\/span>th <span class=\"hljs-keyword\">to<\/span> <span class=\"hljs-number\">31<\/span>st\nORA<span class=\"hljs-number\">-06512<\/span>: at \"OT.CUSTOMERS_CREDIT_TRG\", <span class=\"hljs-type\">line<\/span> <span class=\"hljs-number\">8<\/span>\nORA<span class=\"hljs-number\">-04088<\/span>: error during execution <span class=\"hljs-keyword\">of<\/span> <span class=\"hljs-keyword\">trigger<\/span> <span class=\"hljs-string\">'OT.CUSTOMERS_CREDIT_TRG'<\/span>\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-9\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PostgreSQL SQL dialect and PL\/pgSQL<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">pgsql<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>Note that Oracle automatically rollbacks the update because we call the <code><a href=\"https:\/\/www.oracletutorial.com\/plsql-tutorial\/oracle-raise_application_error\/\">raise_application_error<\/a><\/code> procedure inside the trigger.<\/p>\n\n\n\n<p>In this tutorial, you have learned about the Oracle statement-level triggers and how to use the <code>CREATE TRIGGER<\/code> statement to create a new statement-level trigger in the database.<\/p>\n<div class=\"helpful-block-content\" data-title=\"\">\n\t<header>\n\t\t<div class=\"wth-question\">Was this tutorial helpful?<\/div>\n\t\t<div class=\"wth-thumbs\">\n\t\t\t<button\n\t\t\t\tdata-post=\"2906\"\n\t\t\t\tdata-post-url=\"https:\/\/www.oracletutorial.com\/plsql-tutorial\/oracle-statement-level-triggers\/\"\n\t\t\t\tdata-post-title=\"Oracle Statement-level Triggers\"\n\t\t\t\tdata-response=\"1\"\n\t\t\t\tclass=\"wth-btn-rounded wth-yes-btn\"\n\t\t\t>\n\t\t\t\t<svg\n\t\t\t\t\txmlns=\"http:\/\/www.w3.org\/2000\/svg\"\n\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\tfill=\"none\"\n\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\tstroke-linejoin=\"round\"\n\t\t\t\t\tclass=\"feather feather-thumbs-up block w-full h-full\"\n\t\t\t\t>\n\t\t\t\t\t<path\n\t\t\t\t\t\td=\"M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3\"\n\t\t\t\t\t><\/path>\n\t\t\t\t<\/svg>\n\t\t\t\t<span class=\"sr-only\"> Yes <\/span>\n\t\t\t<\/button>\n\n\t\t\t<button\n\t\t\t\tdata-response=\"0\"\n\t\t\t\tdata-post=\"2906\"\n\t\t\t\tdata-post-url=\"https:\/\/www.oracletutorial.com\/plsql-tutorial\/oracle-statement-level-triggers\/\"\n\t\t\t\tdata-post-title=\"Oracle Statement-level Triggers\"\n\t\t\t\tclass=\"wth-btn-rounded wth-no-btn\"\n\t\t\t>\n\t\t\t\t<svg\n\t\t\t\t\txmlns=\"http:\/\/www.w3.org\/2000\/svg\"\n\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\tfill=\"none\"\n\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\tstroke-linejoin=\"round\"\n\t\t\t\t>\n\t\t\t\t\t<path\n\t\t\t\t\t\td=\"M10 15v4a3 3 0 0 0 3 3l4-9V2H5.72a2 2 0 0 0-2 1.7l-1.38 9a2 2 0 0 0 2 2.3zm7-13h2.67A2.31 2.31 0 0 1 22 4v7a2.31 2.31 0 0 1-2.33 2H17\"\n\t\t\t\t\t><\/path>\n\t\t\t\t<\/svg>\n\t\t\t\t<span class=\"sr-only\"> No <\/span>\n\t\t\t<\/button>\n\t\t<\/div>\n\t<\/header>\n\n\t<div class=\"wth-form hidden\">\n\t\t<div class=\"wth-form-wrapper\">\n\t\t\t<div class=\"wth-title\"><\/div>\n\t\t\t\n\t\t\t<textarea class=\"wth-message\"><\/textarea>\n\n\t\t\t<button class=\"btn btn-primary wth-btn-submit\">Send<\/button>\n\t\t\t<button class=\"btn wth-btn-cancel\">Cancel<\/button>\n\t\t\n\t\t<\/div>\n\t<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>In this tutorial, you will learn how to use the CREATE TRIGGER statement to create a new statement-level trigger in the database.<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":1418,"menu_order":34,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-2906","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Oracle Statement-Level Triggers<\/title>\n<meta name=\"description\" content=\"In this tutorial, you will learn how to use the CREATE TRIGGER statement to create a new statement-level trigger in the database.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.oracletutorial.com\/plsql-tutorial\/oracle-statement-level-triggers\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Oracle Statement-Level Triggers\" \/>\n<meta property=\"og:description\" content=\"In this tutorial, you will learn how to use the CREATE TRIGGER statement to create a new statement-level trigger in the database.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.oracletutorial.com\/plsql-tutorial\/oracle-statement-level-triggers\/\" \/>\n<meta property=\"og:site_name\" content=\"Oracle Tutorial\" \/>\n<meta property=\"article:modified_time\" content=\"2025-06-01T14:50:49+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.oracletutorial.com\/wp-content\/uploads\/2017\/07\/customers-table.png\" \/>\n\t<meta property=\"og:image:width\" content=\"144\" \/>\n\t<meta property=\"og:image:height\" content=\"145\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.oracletutorial.com\\\/plsql-tutorial\\\/oracle-statement-level-triggers\\\/\",\"url\":\"https:\\\/\\\/www.oracletutorial.com\\\/plsql-tutorial\\\/oracle-statement-level-triggers\\\/\",\"name\":\"Oracle Statement-Level Triggers\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.oracletutorial.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.oracletutorial.com\\\/plsql-tutorial\\\/oracle-statement-level-triggers\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.oracletutorial.com\\\/plsql-tutorial\\\/oracle-statement-level-triggers\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.oracletutorial.com\\\/wp-content\\\/uploads\\\/2017\\\/07\\\/customers-table.png\",\"datePublished\":\"2019-08-12T04:05:04+00:00\",\"dateModified\":\"2025-06-01T14:50:49+00:00\",\"description\":\"In this tutorial, you will learn how to use the CREATE TRIGGER statement to create a new statement-level trigger in the database.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.oracletutorial.com\\\/plsql-tutorial\\\/oracle-statement-level-triggers\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.oracletutorial.com\\\/plsql-tutorial\\\/oracle-statement-level-triggers\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.oracletutorial.com\\\/plsql-tutorial\\\/oracle-statement-level-triggers\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.oracletutorial.com\\\/wp-content\\\/uploads\\\/2017\\\/07\\\/customers-table.png\",\"contentUrl\":\"https:\\\/\\\/www.oracletutorial.com\\\/wp-content\\\/uploads\\\/2017\\\/07\\\/customers-table.png\",\"width\":144,\"height\":145,\"caption\":\"customers table\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.oracletutorial.com\\\/plsql-tutorial\\\/oracle-statement-level-triggers\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.oracletutorial.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"PL\\\/SQL Tutorial\",\"item\":\"https:\\\/\\\/www.oracletutorial.com\\\/plsql-tutorial\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Oracle Statement-level Triggers\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.oracletutorial.com\\\/#website\",\"url\":\"https:\\\/\\\/www.oracletutorial.com\\\/\",\"name\":\"Oracle Tutorial\",\"description\":\"Oracle Tutorial\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.oracletutorial.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Oracle Statement-Level Triggers","description":"In this tutorial, you will learn how to use the CREATE TRIGGER statement to create a new statement-level trigger in the database.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.oracletutorial.com\/plsql-tutorial\/oracle-statement-level-triggers\/","og_locale":"en_US","og_type":"article","og_title":"Oracle Statement-Level Triggers","og_description":"In this tutorial, you will learn how to use the CREATE TRIGGER statement to create a new statement-level trigger in the database.","og_url":"https:\/\/www.oracletutorial.com\/plsql-tutorial\/oracle-statement-level-triggers\/","og_site_name":"Oracle Tutorial","article_modified_time":"2025-06-01T14:50:49+00:00","og_image":[{"width":144,"height":145,"url":"https:\/\/www.oracletutorial.com\/wp-content\/uploads\/2017\/07\/customers-table.png","type":"image\/png"}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.oracletutorial.com\/plsql-tutorial\/oracle-statement-level-triggers\/","url":"https:\/\/www.oracletutorial.com\/plsql-tutorial\/oracle-statement-level-triggers\/","name":"Oracle Statement-Level Triggers","isPartOf":{"@id":"https:\/\/www.oracletutorial.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.oracletutorial.com\/plsql-tutorial\/oracle-statement-level-triggers\/#primaryimage"},"image":{"@id":"https:\/\/www.oracletutorial.com\/plsql-tutorial\/oracle-statement-level-triggers\/#primaryimage"},"thumbnailUrl":"https:\/\/www.oracletutorial.com\/wp-content\/uploads\/2017\/07\/customers-table.png","datePublished":"2019-08-12T04:05:04+00:00","dateModified":"2025-06-01T14:50:49+00:00","description":"In this tutorial, you will learn how to use the CREATE TRIGGER statement to create a new statement-level trigger in the database.","breadcrumb":{"@id":"https:\/\/www.oracletutorial.com\/plsql-tutorial\/oracle-statement-level-triggers\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.oracletutorial.com\/plsql-tutorial\/oracle-statement-level-triggers\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.oracletutorial.com\/plsql-tutorial\/oracle-statement-level-triggers\/#primaryimage","url":"https:\/\/www.oracletutorial.com\/wp-content\/uploads\/2017\/07\/customers-table.png","contentUrl":"https:\/\/www.oracletutorial.com\/wp-content\/uploads\/2017\/07\/customers-table.png","width":144,"height":145,"caption":"customers table"},{"@type":"BreadcrumbList","@id":"https:\/\/www.oracletutorial.com\/plsql-tutorial\/oracle-statement-level-triggers\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.oracletutorial.com\/"},{"@type":"ListItem","position":2,"name":"PL\/SQL Tutorial","item":"https:\/\/www.oracletutorial.com\/plsql-tutorial\/"},{"@type":"ListItem","position":3,"name":"Oracle Statement-level Triggers"}]},{"@type":"WebSite","@id":"https:\/\/www.oracletutorial.com\/#website","url":"https:\/\/www.oracletutorial.com\/","name":"Oracle Tutorial","description":"Oracle Tutorial","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.oracletutorial.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/www.oracletutorial.com\/wp-json\/wp\/v2\/pages\/2906","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.oracletutorial.com\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.oracletutorial.com\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.oracletutorial.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.oracletutorial.com\/wp-json\/wp\/v2\/comments?post=2906"}],"version-history":[{"count":0,"href":"https:\/\/www.oracletutorial.com\/wp-json\/wp\/v2\/pages\/2906\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/www.oracletutorial.com\/wp-json\/wp\/v2\/pages\/1418"}],"wp:attachment":[{"href":"https:\/\/www.oracletutorial.com\/wp-json\/wp\/v2\/media?parent=2906"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}